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

gfx-backend-gl with glutin can sometimes fail with "redraw event in non-redraw phase" #3258

Open
tyleo opened this issue May 24, 2020 · 2 comments
Labels
backend: OpenGL client: request feature request from a known client type: bug

Comments

@tyleo
Copy link

tyleo commented May 24, 2020

Short info header:

  • GFX version: 0.5
  • OS: Windows 10
  • GPU: Nvidia GeForce GTX 1080

winit appears to fail occasionally on version 0.21, glutin 0.23 uses winit version 0.21, and gfx-backend-gl uses glutin 0.23.

In other words, if you have the following in your cargo.toml, you may occasionally see the error "redraw event in non-redraw phase" on windows:

gfx-backend-gl = { version = "0.5", optional = true, features = ["glutin"] }

It seems like this can be fixed with a glutin version bump.

I'm currently working around this in my own cargo.toml file with something like:

[features]
dx11 = ["gfx-backend-dx11", "winit"]
dx12 = ["gfx-backend-dx12", "winit"]
gl = ["gfx-backend-gl", "winit_gl"]
metal = ["gfx-backend-metal", "winit"]
vulkan = ["gfx-backend-vulkan", "winit"]

[dependencies]
winit = { package = "winit", version = "0.22.2", optional = true}
winit_gl = { package = "winit", version = "0.21", optional = true}

Then, in the root of my crate I have my own winit module, winit.rs with the contents:

#![cfg(any(feature = "winit", feature = "winit_gl",))]

#[cfg(feature = "winit")]
pub use winit::*;
#[cfg(feature = "winit_gl")]
pub use winit_gl::*;

Rather than use winit; throughout my project I'm doing use crate::winit;.

This fixes the problem for other platforms but gl still breaks occasionally.

@kvark
Copy link
Member

kvark commented May 24, 2020

We can't bump glutin dependency in the released version, since this is a breaking change.
We do update it in master though. If you can't reproduce the problem in master, it will be considered fixed.

@kvark kvark added backend: OpenGL client: request feature request from a known client type: bug labels May 24, 2020
@tyleo
Copy link
Author

tyleo commented May 25, 2020

Yep, I can check master. I forget to add this but FWIW, this is the winit PR that fixes the issue: rust-windowing/winit#1461

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend: OpenGL client: request feature request from a known client type: bug
Projects
None yet
Development

No branches or pull requests

2 participants