OpenGL and threads

OpenGL drivers are generally not known to tolerate multithreading. However, does one have to deal with the main thread (e.g. SDL) that raised the GL context? If one spawns a stream and from that moment OpenGL commands are sent from there, will it be safe? Or is it to be limited to the main thread that caused the GL context?

+4
source share
1 answer

You need to make the OpenGL context current in the stream that you want to use, and the context can be made current only one stream at a time. Therefore, creating a context and using it from another thread is fine if you make it current.

OpenGL OpenGL, . OpenGL.

+6

All Articles