Multithreading and OGL

Started by
1 comment, last by tHiSiSbOb 20 years, 8 months ago
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?
----------------------------------------------------"Plant a tree. Remove a Bush" -A bumper sticker I saw.
Advertisement
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
--------------------------------------------------------There is a theory which states that if ever anybody discovers exactly what the Universe is for and why it is here, it will instantly disappear and be replaced by something even more bizarre and inexplicable.There is another theory which states that this has already happened...
I don''t...I was just curious.
----------------------------------------------------"Plant a tree. Remove a Bush" -A bumper sticker I saw.

This topic is closed to new replies.

Advertisement