-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Documentation doesn't explain how to create an ActiveEventLoop #3877
Copy link
Copy link
Open
Labels
S - docsAwareness, docs, examples, etc.Awareness, docs, examples, etc.
Milestone
Description
To quote from https://docs.rs/winit/latest/winit/index.html
Before you can create a Window, you first need to build an EventLoop. This is done with the EventLoop::new() function.
use winit::event_loop::EventLoop;
let event_loop = EventLoop::new().unwrap();
Then you create a Window with create_window
This doesn't work because the suggested next step requires a different type.
While there are examples in repo, they're all large and bespoke which encourages using the library as a blackbox.
Some other users had similar issues: #3662
Personally, reading the docs, I'm still not sure if it's even possible to use the library without having it hijack the execution flow from the hosting applications thread.
My impression is that it isn't (as per comments on run_app regarding handling of iOS) and you're expected to provide an Application type. If that is the case, it may be worth clarifying in the docs too as the next step isn't to create a Window with create_window but to implement.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
S - docsAwareness, docs, examples, etc.Awareness, docs, examples, etc.