Skip to content
This repository has been archived by the owner on Jun 18, 2021. It is now read-only.

Removed erroneous zero size check related conditional in water example resize() #534

Merged
merged 2 commits into from Aug 25, 2020
Merged

Conversation

crispweed
Copy link
Contributor

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

…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
Copy link

@monocodus monocodus bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is an autogenerated code review.

Checker summary (by rust_clippy):
The tool has found 0 warnings, 2 errors.

The .monocodus config not found in your repo. Default config is used.
Check config documentation here

…ero, e.g. NaN being passed in cgmath::perspective() aspect ratio parameter.

Fixes #531
Copy link

@monocodus monocodus bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is an autogenerated code review.

Checker summary (by rust_clippy):
The tool has found 0 warnings, 2 errors.

The .monocodus config not found in your repo. Default config is used.
Check config documentation here

Copy link
Member

@kvark kvark left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@kvark
Copy link
Member

kvark commented Aug 25, 2020

I'm thinking that a proper application would not even try to create a swapchain when it's minimized. It serves no use. It should not try to render anything.
But for a short-term fix, your PR is good. We've had a lot of reports for crashing on minimizing the examples...

@kvark kvark merged commit 1935cfa into gfx-rs:master Aug 25, 2020
kejor pushed a commit to kejor/wgpu-rs that referenced this pull request Nov 28, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Water example viewport goes black momentarily on resize Water example validation error when resize
2 participants