Skip to content
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

Use default resolution for viewport_debug example #9666

Merged
merged 2 commits into from
Sep 2, 2023

Conversation

rparrett
Copy link
Contributor

@rparrett rparrett commented Sep 1, 2023

Objective

The viewport_debug example opens a window that is physically very large. Probably larger than the screen for the majority of machines.

Solution

Remove the custom resolution and adjust the pixel coordinates so that everything lines up.

At the default resolution, everything is still whole numbers even without adjusting the viewport coordinates.

@rparrett rparrett changed the title Use default resolution Use default resolution for viewport_debug example Sep 1, 2023
@rparrett
Copy link
Contributor Author

rparrett commented Sep 1, 2023

Ping @ickshonpe

@rparrett rparrett added the C-Examples An addition or correction to our examples label Sep 1, 2023
@ickshonpe
Copy link
Contributor

Ah I was super confused for a moment, forgot that I even wrote this thing. The changes look fine, though we should probably scrap this eventually and have a proper example that explains the different Val variants in detail etc.

@ickshonpe
Copy link
Contributor

I guess though there could be a problem with this if the default resolution is changed in the future?

@rparrett
Copy link
Contributor Author

rparrett commented Sep 2, 2023

we should probably scrap this eventually and have a proper example that explains the different Val variants in detail etc.

Agreed.

I guess though there could be a problem with this if the default resolution is changed in the future?

I suppose we could explicitly define the resolution.

@alice-i-cecile alice-i-cecile added the S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it label Sep 2, 2023
@alice-i-cecile alice-i-cecile added this pull request to the merge queue Sep 2, 2023
Merged via the queue into bevyengine:main with commit 870d46e Sep 2, 2023
22 checks passed
rdrpenguin04 pushed a commit to rdrpenguin04/bevy that referenced this pull request Jan 9, 2024
# Objective

The `viewport_debug` example opens a window that is physically very
large. Probably larger than the screen for the majority of machines.

## Solution

Remove the custom resolution and adjust the pixel coordinates so that
everything lines up.

At the default resolution, everything is still whole numbers even
without adjusting the viewport coordinates.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-Examples An addition or correction to our examples S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants