-
Notifications
You must be signed in to change notification settings - Fork 270
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
wgpu and winit update tracker #503
Comments
I've already upgraded to 0.18, but an upgrade to winit 0.29 might take a little longer. I created different demo using winit 0.29 so hopefully it shouldn't be too painful. |
Hi, I've been working through the learn-wpgu book, but with updated winit and wgpu. Id be happy the help out with rewriting stuff! |
|
Winit 0.30 was released just yesterday, which seems to prefer the |
@tgross35 Thanks for the heads-up. How about async methods? I have the following code in my let instance = wgpu::Instance::default();
let surface = instance.create_surface(window).expect("Failed to create surface");
// need adapter to create the device and queue
let adapter = instance
.request_adapter(&wgpu::RequestAdapterOptions {
power_preference: wgpu::PowerPreference::default(),
force_fallback_adapter: false,
compatible_surface: Some(&surface),
})
.await
.unwrap();
let (device, queue) = adapter
.request_device(
&wgpu::DeviceDescriptor {
label: None,
required_features: wgpu::Features::empty(), //The device you have limits the features you can use
required_limits: wgpu::Limits::default(), //The limits field describes the limit of certain types of resource we can create
},
None,
)
.await
.unwrap(); but the trait method is synchronous, so do we have to introduce a |
Just FYI, I updated my code to wgpu 0.20, which was released 5 hrs ago and is very easy to migrate to. Just follow rustc's error messages. |
I have just been using (reposting here since I accidentally posted this comment on the winit tracker) |
Yeah the |
Using |
What is the current thoughts on upgrading to winit 0.30? It feels like a significant effort to move all beginner tutorials to 0.30 but could it be interesting to have an intermediate tutorial that shows how to port to 0.30? |
I think as of now, both |
I created a branch to experiment with 0.30. While I got the code to run on WASM, the canvas was being sized to 1x1 for some reason. That killed the momentum I had to work on it, and I haven't had time to come back to it. |
Accidentally closed the issue while trying to make a comment |
Hey! Here is just a heads-up that
wgpu
0.18 andwinit
0.29.2 came up recently with a lot breaking changes.For the breaking changes from
wgpu
, please see https://github.com/gfx-rs/wgpu/releases/tag/v0.18.0. I think these are easy to be fixed when upgrading from 0.17.However, for the newer
winit
, it brings a LOT API changes. See https://github.com/rust-windowing/winit/releases/tag/v0.29.2I think virtually a rewrite on sections about windowing is needed.
If it helps, I just did the upgrade to
winit
0.29.2 for my wgpu DVR renderer in this commit. In short, we need to:rwh_05
ofwinit
for raw-window-handle traitsThe text was updated successfully, but these errors were encountered: