-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix wgpu integration example #1139
Conversation
What kind of crash? Do you get a backtrace? I think we should probably make all of our drawing operations return a |
It is a
The problem is that, AFAIK it is not possible to get a |
e6ab610
to
8b0f2e6
Compare
e2d6d2d
to
0412718
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for giving this a shot! 🙇
I was able to identify the problem and came up with a simpler fix. We can just recreate the Viewport
during RedrawRequested
after a resize.
I don't believe there is a consistent way to eliminate the validation errors caused by a mismatch between window and surface dimensions. They were present with your previous changes and are still present now.
In any case, at least the example should not crash now when resizing quickly.
On
master
, I can make the integration example crash on XFCE by resizing the window quickly. I believe this to be due to the fact that the window's size can change between the last time we processed theResize
event, and the moment we generate the next frame texture.This PR avoids this by checking that the last processed size is correct before redrawing.