Skip to content

Window and WindowDescriptor should specify present_mode instead of vsync #3807

@aloucks

Description

@aloucks

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

Allow the user to control the present mode rather than interpreting it. A boolean value for vsync allows for two options where as the actual PresentMode has three: Mailbox, Fifo, and Immediate.

What solution would you like?

Replace vsync: bool with present_mode: wgpu::PresentMode on Window and WindowDescriptor.

What alternative(s) have you considered?

There is currently no way to use PresentMode::Mailbox.

Additional context

I'll submit a PR for the change if it's welcomed. I think the default should remain Fifo and documentation can be added to describe that Fifo represents vsync = true.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-WindowingPlatform-agnostic interface layer to run your app inC-FeatureA new feature, making something new possible

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions