examples: Update winit requirement to 0.30#1008
Conversation
…ad of deprecated event_loop.run_app method
|
I'd merge this, but both it and master fail on my (NixOS) machine with: so I'd better wait for someone else to test. |
| fn resumed(&mut self, event_loop: &winit::event_loop::ActiveEventLoop) { | ||
| let window_attributes = | ||
| WindowAttributes::default().with_inner_size(PhysicalSize::<u32>::from((800, 600))); | ||
| let window = event_loop.create_window(window_attributes).unwrap(); |
There was a problem hiding this comment.
Window creation does not belong inside surface "creation", if that is suggested by an upstream example that's an error.
If I remember correctly we cleared up all the callbacks and terminology upstream in the impending winit 0.31 release.
There was a problem hiding this comment.
I created the window in the resume method because that is what the main example in the winit docs does (and then of course surface creation depends on window creation).
If that's incorrect behavior though maybe both examples need to be updated?
There was a problem hiding this comment.
Looks like in the next release of winit this is split into a can_create_surface method: https://rust-windowing.github.io/winit/winit/changelog/index.html#changed
But since this isn't available in 0.30, resumed is the correct method to create the window & surface in. (Maybe we add a reminder comment though? Just to make it clear?)
winit requirement to 0.30
Supersedes #914 (since 0.30 has breaking changes it requires some code changes).