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 builder methods for VSync and setting wgpu backend #78

Merged
merged 2 commits into from
May 20, 2020

Conversation

Aeledfyr
Copy link
Contributor

  • enable_vsync sets the VSync mode
  • wgpu_backend sets the wgpu BackendBit struct
  • Made RequestAdapterOptions use compatible_surface by default. This doesn't do much for most cases, but it may avoid problems for some specific setups and seems to be the correct thing to do.

This fixes #57 and #75.

* enable_vsync sets the VSync mode
* wgpu_backend sets the wgpu BackendBit struct
* Made RequestAdapterOptions use compatible_surface by default
Copy link
Owner

@parasyte parasyte left a comment

Choose a reason for hiding this comment

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

Great contribution! Thank you. I left just one comment.

src/lib.rs Outdated Show resolved Hide resolved
This doesn't expose the PresentMode for the external api, because
the variants of PresentMode aren't very obvious to people without
wgpu experience.  Mailbox corresponds to VSync enabled, and
Immediate corresponds to VSync disabled.
Copy link
Owner

@parasyte parasyte left a comment

Choose a reason for hiding this comment

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

This looks fantastic!

@parasyte parasyte merged commit b43336d into parasyte:master May 20, 2020
@Aeledfyr Aeledfyr deleted the add/builder-methods branch May 20, 2020 15:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add builder method for setting VSync
2 participants