Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

OpenGL + Multithreading = ?

Name: Apprentice 2011-12-08 11:29

Is there any way to draw Geometry in OpenGL to a single window simultaneously via multiple threads?
(Using Untermensch GLUT)

I seem to have managed a ghetto solution: The main display function in the 1st Thread clears the buffers and draws it's geometry, meanwhile the second Thread calls a glClear(NULL) (Doesn't work without it, no idea why), draws it's part of the geometry and calls a glFlush() and just keeps looping for eternity.
This solution sucks balls for several obvious reasons not worth discussing. I tried adding a global boolean state that would manage when the second thread is allowed to draw, though adding it made the thread draw nothing at all.

I'd like to know how you've managed MT in OpenGL, and if there isn't a possibility like that at all I'd like to know some clever techniques to make OpenGL apps run faster.
Thank You.

Name: F r o z e n V o i d !!mJCwdV5J0Xy2A21 2011-12-08 11:35

Name: Anonymous 2011-12-08 12:26

>>2
DON'T HELP HIM!!!

Name: Apprentice 2011-12-08 13:27

>>2
May you walk on warm sands.
>>3
Die in a fire.

Name: Anonymous 2011-12-08 13:29

>>4
I try to write opengl when I'm too dumb to use google

Who the fuck am I quoting?

Name: Apprentice 2011-12-08 13:35

>>5
I've read that article a billion times before ffs, it didn't help me and it in no way answers my questions.
Even if it did that's a shit reason to refuse help to anyone, gtfo /prog/ if you can but don't help.

Name: Anonymous 2011-12-08 13:42

>>6
Suck my cock dude

Name: Anonymous 2011-12-08 13:42

Name: Anonymous 2011-12-08 14:09

why would you want to multi-thread draw
make threads do the stuff you need to synch data to one drawing thread

Name: Apprentice 2011-12-08 14:17

>>9
My attempt at sculpting software, I'm very unsatisfied with the current speed and I'd like to know if there's perhaps a trick to loop through a high count of vertices faster.
Even performing the calculations on a separate thread isn't quite giving me the results I'm looking for.

Name: Anonymous 2011-12-08 14:23

>>10
mayhap you need to simply the shape you want to draw since it has too many vertices?

Name: Anonymous 2011-12-08 17:28

>>11
amazing dubs bro

Name: Anonymous 2011-12-09 1:05

>>10

If you are rendering your stuff in software by writing colors values directly to a buffer in RAM, then using threading to take advantage of a multicore cpu makes sense. But forcing multiple threads to try to push messages over to a single graphics processor at once doesn't seem like a good idea me. You should probably look into other optimizations for speed, like sending the data over to teh graphics processor, and then asking it to draw it when needed, with display lists and such:

http://www.songho.ca/opengl/gl_displaylist.html

Name: Anonymous 2011-12-09 1:21

>>13
Display lists are shit because they're for fixed-function pipelines.

Name: Anonymous 2011-12-09 1:23

>>14

They are more restrictive. But that allows for easy processing in hardware. So it fasta. When display list will werk, use dem. When de don't. Use da otha tings.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List