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
{{ message }}
This repository has been archived by the owner on Jun 18, 2021. It is now read-only.
Looking at the resize function for this example, I see:
if sc_desc.width == 0 && sc_desc.height == 0 {
// Stop rendering altogether.
self.active = None;
return;
} else {
// The next frame queued is the wrong size: (0, 0),
// so we skip a frame to avoid crashes where our
// textures are the correct (window) size, and the
// frame is still (0, 0).
self.active = Some(self.current_frame + 1);
}
That doesn't seem to make sense, and changing to the following resolves the issue for me (viewport no longer goes black momentarily on resize):
…e resize() (#534)
* The conditional at the start of resize() already tests for and exits on the zero width and height condition.
The conditional removed here was then getting run on every other call to resize(), which doesn't seem logical, doesn't correspond to the comment, and seemed to be causing at least one issue with rendered viewport going black during resize.
Fixes#532
(probably) Fixes#519
* Defensive coding to prevent various issues when window size goes to zero, e.g. NaN being passed in cgmath::perspective() aspect ratio parameter.
Fixes#531
Looking at the resize function for this example, I see:
That doesn't seem to make sense, and changing to the following resolves the issue for me (viewport no longer goes black momentarily on resize):
The text was updated successfully, but these errors were encountered: