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

Add a way to prefer mailbox rendering, but still have a graceful fallback to fifo #6243

Open
johanhelsing opened this issue Oct 12, 2022 · 3 comments
Labels
A-Rendering Drawing game state to the screen C-Usability A simple quality-of-life change that makes Bevy easier to use

Comments

@johanhelsing
Copy link
Contributor

What problem does this solve or what need does it fill?

Be able to prefer a tear-free low-input latency experience, but fall back to fifo if not possible.

  • The current API of PresentMode allows you to specify that you want MailBox, but it will panic if it isn't available.
  • If you select the AutoNoVSync option, you will get Immediate which will cause tearing.

Note that the docs on docs.rs are self-contradicting (fixed in #5831)

What solution would you like?

Maybe the window descriptor could take a vec of modes in preferred order?

What alternative(s) have you considered?

Just use Fifo instead.

@johanhelsing johanhelsing added C-Enhancement A new feature S-Needs-Triage This issue needs to be labelled labels Oct 12, 2022
@alice-i-cecile alice-i-cecile added A-Rendering Drawing game state to the screen C-Usability A simple quality-of-life change that makes Bevy easier to use and removed C-Enhancement A new feature S-Needs-Triage This issue needs to be labelled labels Oct 12, 2022
@alice-i-cecile
Copy link
Member

Can we use a try_set idiom here, to give control of the fallback strategy directly to users?

@mockersf
Copy link
Member

If I remember correctly, this is wgpu api and Bevy can't set a fallback

@MDeiml
Copy link
Contributor

MDeiml commented Oct 15, 2022

There is get_supported_present_modes, which can be called before configure_surface, so this should be possible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Rendering Drawing game state to the screen C-Usability A simple quality-of-life change that makes Bevy easier to use
Projects
None yet
Development

No branches or pull requests

4 participants