-
Notifications
You must be signed in to change notification settings - Fork 22
Make present mode configurable #102
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
Conversation
|
I don't use the window crate either; it's great for examples but any serious user is going to want much more control over their window(s). So it's kind of a starting point, and I like how this keeps that API simple but clearly shows where you can do neat stuff. I really like the documentation calling out the tearing behavior because those modes are confusing. Having a copy of ... but essentially all users would use this logic because the choice is either smooth animation (fifo or relaxed) or immediate display (immediate or mailbox). The other present modes are interesting and I wonder if the extensions should be checked and added to the physical device capabilities so they can be used. These are my thoughts, but overall this is great and better than current. So your call if we make further changes or just merge. |
|
@attackgoat Good point about having the copy. Hadn't thought about how screen-13 only has one backend so it makes sense to use the vk stuff directly. Would this |
|
Here's an example of what I'm describing, it might be one of those APIs that is more cumbersome than required: |
|
Hmm I wonder if this is maybe getting a bit fancy for just the vsync modes, not sure. I think this would also require |
|
A
|
|
If you're good with this design than so am I and let's fix the test and merge it. Another option is to create new functions on I am mixed because in general I can't decide whether this crate should make helpful choices or help make choices. |
|
Yeah, it's a tricky balance. I think I'm good with this for now, but something worth considering, for sure. |
Sometimes a bit more flexibility is needed here than just vsync on/off for testing, and occasionally in video games players may also want more control.
Inspired by https://github.com/gfx-rs/wgpu/blob/v25/wgpu-types/src/lib.rs#L5125 but didn't include
AutoVsyncorAutoNoVsync, and rather opted for making all of the modes non-fallible with appropriate fallback options.Didn't update
WindowDataorWindowBuilderin this PR since I wanted to get your opinion first on the general direction first. (I also don't personally useWindowDataorWindowBuilderso I wouldn't need a change with those to accomplish what I'm trying to do)