Do display lists need to be compiled in the same thread where they’re called?
I’m trying to attach a basic OpenGL window to an otherwise non-windowed program. So I don’t have a central event loop.
To get around this, I figured I’d spawn one thread corresponding to each window, and just have the event loop in there. This appears to work fine so long as the window is created within the thread.
However, due to an apparent bug in NVIDIA’s drivers which causes a crash whenever an OpenGL context is destroyed on XP64, I can’t just start a new thread whenever I’d like to change what’s being displayed. Instead, I have to update the data the thread is accessing.
Now, I could simply give the thread the object to draw. That works, but it’s inflexible. It won’t, for example, allow an easy way of superimposing one object’s image on another. The alternative seemed to be creating display lists outside the window thread, and then just calling them in the thread.
However, this doesn’t appear to work. Anyone have better ideas how I can approach this?
Another option would be getting function pointers in the mix, but that seems like overkill…
EDIT: It’s probably because I’m trying to compile the display list before creating the OGL context…
EDIT 2: Not the entire problem. Despite using conditions and signals to prevent the glGenLists call until the context is created, it still isn’t working.