Skip to main content
GameDev.net gamedev.net
🔒 Locked

openGL & Thread

Started by flagadajones Aug 28, 2001 at 10:07 AM 2 replies 550+ views
Original Post
flagadajones
flagadajones
i have a problem when i try to generate display lists in a thread.glGenLists(..) return GL_INVALID_OPERATION. i have a OGL manager in a thread and many function use OGL in an other thread. how can i resole this problem? possibility to change the active thread?.. i use VC++6 on W2k.
Pauly
Pauly
Don''t quote me on this, but you may need to use wglMakeCurrent and supply a handle to the OpenGL surface to get it drawing across different threads. Means you can''t use glut

Paul Groves
pauls opengl page
flagadajones
flagadajones
we are in thread2.
it is possible to change the active thread(go to thread1) for the execution of one instruction and come back in thread2?
Pauly
Pauly
Yeah I believe it is - although not advised. Think about it, the timeliness of the threads isn't concrete - you're not sure which function will complete first (worst case; It might not complete at all) and I'll bet calling wglMakeCurrent too often is expensive...

Paul Groves
pauls opengl page

Edited by - Pauly on August 29, 2001 10:57:18 AM

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.