Skip to content

Commit

Permalink
fix present mode for wgl (#4865)
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaopengli89 authored Dec 12, 2023
1 parent 6dc9cca commit ecc301e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion wgpu-hal/src/gles/adapter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1136,7 +1136,7 @@ impl crate::Adapter<super::Api> for super::Adapter {
Some(crate::SurfaceCapabilities {
formats,
present_modes: if cfg!(windows) {
vec![wgt::PresentMode::Fifo, wgt::PresentMode::Mailbox]
vec![wgt::PresentMode::Fifo, wgt::PresentMode::Immediate]
} else {
vec![wgt::PresentMode::Fifo] //TODO
},
Expand Down
2 changes: 1 addition & 1 deletion wgpu-hal/src/gles/wgl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -744,7 +744,7 @@ impl crate::Surface<super::Api> for Surface {
}

let vsync = match config.present_mode {
wgt::PresentMode::Mailbox => false,
wgt::PresentMode::Immediate => false,
wgt::PresentMode::Fifo => true,
_ => {
log::error!("unsupported present mode: {:?}", config.present_mode);
Expand Down

0 comments on commit ecc301e

Please sign in to comment.