dwmkerr / sharpgl

Use OpenGL in .NET applications. SharpGL wraps all modern OpenGL features and offers a powerful scene graph to aid development.
MIT License
755 stars 299 forks source link

Is it necessary to start a new thread for opengl's current context? #107

Open bitzhuwei opened 9 years ago

bitzhuwei commented 9 years ago

I just saw something interesting here(https://www.opengl.org/wiki/Creating_an_OpenGL_Context_(WGL)). It says that 'The current context is thread-specific; each thread can have a different context current, and it's dangerous to have the same context current in multiple threads.' So maybe it 's necessary to start a new thread for opengl's rendering in OpenGLControl and SceneControl in case that there are more than one OpenGLControls in a Winform or app.