denovodavid / glamour

💎 Rust & OpenGL Rendering Project
https://glamour.davidhol.land
0 stars 0 forks source link

Can I move the window to a separate thread? #9

Open denovodavid opened 4 years ago

denovodavid commented 4 years ago

A winit window can be moved to a new thread: https://github.com/rust-windowing/winit/blob/master/examples/multithreaded.rs

But, I assume the whole glutin window context must be moved as well, which probably means, I have to have all my OpenGL calls on that thread.

What exactly needs to be on the thread for it to work? Everything else can go in the main thread to split the simulation and presentation.