You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In servo/webrender#1640 we discussed how Firefox
(and probably also other browsers) have a compositor thread, which is not the
main thread, that does all their OpenGL calls. In glutin this kind of
architecture doesn't seem to be possible right now since it's not possible to
split the `GlWindow` into the window and the context, and the `Context`
doesn't implement `Send` on macOS.
The following two changes allow such architectures:
- Implement `Send` for `Context` on macOS. The Apple docs suggest that this is correct.
- Add a `split` method to `GlWindow` that allows obtaining an owned `Window` and `Context`.
Copy file name to clipboardexpand all lines: src/platform/macos/mod.rs
+4
Original file line number
Diff line number
Diff line change
@@ -37,6 +37,10 @@ pub struct Context {
37
37
pixel_format:PixelFormat,
38
38
}
39
39
40
+
/// according to https://developer.apple.com/library/content/documentation/GraphicsImaging/Conceptual/OpenGL-MacProgGuide/opengl_threading/opengl_threading.html
41
+
/// it is safe to use an `NSOpenGLContext` from multiple threads provided only one thread does so at a time.
0 commit comments