You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On Qt it seems like the resize event is sent only after the canvas has already resized, with pygfx this causes the renderer to try and draw the scene to a canvas that is smaller than expected. This does not happen on glfw or jupyter_rfb.
For example if we use this example and resize the window to make it smaller we get a GPUValidationError:
I can indeed reproduce this. This is because the scheduler does basically this:
wait
process events, then ask backend to make a draw
draw
I the canvas is resized between asking for a draw and the actual draw taking place, the size will mismatch. This delay is generally really small, and should not affect the experience (similar to how events can happen while the draw takes place). But resize events are special, because it can cause the canvas size to mismatch.
Perhaps the "resize" event should be special, possibly firing more often, and not allowing a sync handler (otherwise we cannot call it during the draw). This fits into the idea to maybe turn the draw into an event as well.
In the mean time, I'd recommend simply updating the rect on each draw, right before calling .render().
On Qt it seems like the resize event is sent only after the canvas has already resized, with
pygfx
this causes the renderer to try and draw the scene to a canvas that is smaller than expected. This does not happen on glfw or jupyter_rfb.For example if we use this example and resize the window to make it smaller we get a
GPUValidationError
:The text was updated successfully, but these errors were encountered: