Archived

This topic is now archived and is closed to further replies.

tHiSiSbOb

Multithreading and OGL

Recommended Posts

I had nothing to do the other day so just for fun I tried to code a simple application that drew objects using different threads. When I tried it though, it showed dots and squares with strange colors. Is there n e way that I can get this to work?

Share this post


Link to post
Share on other sites
The GL recieves the commands from the different threads at one time an unorderd. So something like this may happen:

glColor3f(..);
glColor3f(..);
glBegin(..);
glVertex3f(..);
glVertex3f(..);
glColor3f(..);
glBegin(..);
glVertex3f(..);

And such a routine causes errors. This may work with multiple contexts. But why do you want to do this?

Corrail
corrail@gmx.at
ICQ#59184081

Share this post


Link to post
Share on other sites