Archived

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

Multithreading and OGL

This topic is 5244 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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