I have a main thread with a render context and a worker thread without any context.
At some point the worker should create a context and use it to generate textures which are shared with the main threads context.
I have successfully created the new context in the worker thread, but when trying to share lists I have run into a problem.
In order for wglShareLists to work, the main thread must make its context non current since sharing does not work on current contexts as described in
The worker thread should then somehow “ask” the main thread to give up on its context and pause for a while untill the sharing is complete and then make its context current again. That seems silly… should I really include a test for “someone wants me to let go of my context” in my main threads loop???
How should I proceed?