Originally posted by def:
In OpenGL each thread needs its own Rendering Context? […]
Each thread can have at most one current context. A context can be current for only one thread at a time.
So, being “current” does not imply that the context must be different. However it implies that one unique context must be exclusively accessed by one thread at a time.
Recall that OpenGL is by nature a client/server architecture. So having multiple thread issuing commands concurrently in the same context would lead to a breakup of the GL commands protocol and inconsistent status in the state machine.
Efficient use of multiprogramming, at a safe level, is for example to carry out independent calculations in parallel.
Obviously multi-threading really pays off on SMP systems.
If I can remember, when having a decent hardware, GL commands usually are inexpensive to be executed
(they are buffered by the driver). So generally they should not be considered a major performance hit. What needs the most care in coding is state change (to be minimized), and data transfer.
I suggest that you reconsider your code and eventually revert to single threading, that in the case you presented would seem to be the natural choice.