LWJGL Forum

Programming => Lightweight Java Gaming Library => Topic started by: elias4444 on December 09, 2006, 01:17:17

Title: Mac multi-threaded opengl?
Post by: elias4444 on December 09, 2006, 01:17:17
Just wondering if there was a way to turn multi-threaded opengl on via lwjgl or not? I hear it can seriously boost performance for Macs. And if so, how do you use it?  :P
Title: Re: Mac multi-threaded opengl?
Post by: Matzon on December 09, 2006, 10:25:08
If you're not limited OpenGL wise, then you can multithread your application in general. However OpenGL itself is not multithreaded and won't gain anything from lots of context switches when rendering using multiple threads.
Title: Re: Mac multi-threaded opengl?
Post by: Fool Running on December 11, 2006, 14:36:34
QuoteJust wondering if there was a way to turn multi-threaded opengl on via lwjgl or not? I hear it can seriously boost performance for Macs. And if so, how do you use it?
I thought multi-threaded OpenGL was a driver thing (i.e. use a separate thread to send stuff to the graphics card or something). I know its an option in the newest NVidia drivers, so that's what I assumed. But I could be wrong :D
Title: Re: Mac multi-threaded opengl?
Post by: cornholio on January 05, 2007, 07:40:50
Quote from: Fool Running on December 11, 2006, 14:36:34
QuoteJust wondering if there was a way to turn multi-threaded opengl on via lwjgl or not? I hear it can seriously boost performance for Macs. And if so, how do you use it?
I thought multi-threaded OpenGL was a driver thing (i.e. use a separate thread to send stuff to the graphics card or something). I know its an option in the newest NVidia drivers, so that's what I assumed. But I could be wrong :D

i guess your are talking about this feature:
http://www.macworld.com/news/2006/08/16/multithread/index.php (http://www.macworld.com/news/2006/08/16/multithread/index.php)

i don't think this feature could be leveraged by LWJGL. it just means that there is some kind
of 'internal command pipeline' for OpenGL operations to make better use of the dual core in
macpro machines...
Title: Re: Mac multi-threaded opengl?
Post by: cornholio on June 11, 2007, 19:55:20
the feature in action:
Apple WWDC Demo of World of Warcraft on Leopard OSX 10.5
http://www.youtube.com/watch?v=PM6s59OPJbk (http://www.youtube.com/watch?v=PM6s59OPJbk)
Title: Re: Mac multi-threaded opengl?
Post by: princec on June 11, 2007, 21:50:11
Wow, that really is an impressive jump. I wonder if Tribal Trouble will receive a (largely unnecessary ;)) similar performance hike?

Cas :)
Title: Re: Mac multi-threaded opengl?
Post by: elias4444 on June 15, 2007, 02:48:40
I noticed in the demo that they said they enabled it via a single line of code... anyone know what that line is?  :D
Title: Re: Mac multi-threaded opengl?
Post by: catchpole on June 28, 2007, 02:48:41
Im not looking at this from a gaming point of view, I'm working on a visualization tool for various data sources etc (databases, object models etc).  My approach will be to use multiple threads to collect and prepair what needs to be rendered (as these threads may block for various amounts of time) and then syncronize the results into an object tree the single renderer thread can run over very quickly. 
Title: Re: Mac multi-threaded opengl?
Post by: Orangy Tang on July 19, 2007, 12:28:33
I stumbled across this thread today: http://www.opengl.org/discussion_boards/ubb/ultimatebb.php?ubb=get_topic;f=3;t=015291

It contains some interesting info on the nVidia multithreading implementation (IIRC "cass" is an nVidia engineer). Sounds like it can have some nasty side effects as to the speed of seemingly benign function calls.