View Full Version : OpenGL and Multithread
pango
10-29-2003, 03:38 AM
I create a OpenGL render context in main thread,but how can I render scene to the context in other thread?I'm still finding the documents about the relationship of OpenGL and multithread,anyone can help me?
NitroGL
10-29-2003, 06:06 AM
IIRC, OpenGL contexts can only be used in the original calling thread that it was created in. From the main thread, you could launch a thread that creates the GL context and runs the render loop.
azazello
10-29-2003, 08:06 AM
plain example exist in SGI SDK http://oss.sgi.com/projects/ogl-sample/GLsdk.zip
GL context can only be current in one thread at a time.
So you have to wglMakeCurrent(NULL, NULL);
in the main thread before making your context current in the slave/drawing thread.
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.