Login  Register

Re: JOGL limitations?

Posted by Demoscene Passivist on Jul 22, 2010; 10:55pm
URL: https://forum.jogamp.org/JOGL-limitations-tp986701p988459.html

>Ideally I would like to be able to produce an applet version of at least part of
>our application so I am guessing that limits us to using some kind of (slow?)
>AWT integration.  Is that correct?

So far I've only seen JOGL applets using AWT. A couple of month ago Sven stated in his blog stg about eliminating the need to use AWT for applets: "I will show a NEWT-AWT applet demo, and later, after finishing the AWT-Less plugin feature, we don’t even need to use AWT anymore." http://jausoft.com/blog/2009/07/03/jogl-applets-part-1/ But I don't know how far that implementation has progressed since.

Anyway I wouldnt overestimate the impact of AWT vs. NEWT in a common single threaded single rendering window application. As stated in the FAQ a real performance penalty only arises when u use AWT with mutliple threads rendering to multiple windows so that the surface locking mechanism "blocks" the other threads. So saying AWT+JOGL is "slow" is a little bit exaggerated :)

To give u an impression what performance to expect using AWT or better JOGL in general take this simple vertex shading example http://www.youtube.com/user/DemoscenePassivist#p/c/9725BF2AF5A18CD9/22/VovI20JntjQ on my NVidia Geforce 8800M GTX (average notebook GPU) it runs at an average of 1400 FPS in 1280x1024.

Also u should note that with the javax.media.nativewindow infrastructure provided with JOGL2 u can easily switch between window-toolkits with little implementation work on ur side.

>On the desktop we are not so limited and can choose any windowing toolkit.  
>What are our options there?  It is clear that using Swing is going to reduce
>performance so what else is there for wrapping a JOGL application?

Personally I'm using AWT for all of my experiments on the desktop. Mainly because I'm using the Fullscreen-Exclusive-Mode feature of AWT to get correct vertical sync. Thats a feature NEWT is lacking at the moment but for normal window-mode rendering I guess "AWT is ok for single threaded single rendering window applications" and "NEWT is better when using mutliple rendering windows and threads".

But I would NOT recommend using Swing/GLJPanel. If u are a really dedicated Swing lover u can get it to work correctly but without going further into the details if u want to stay out of trouble avoid using the GLJPanel. The main reason is that u often loose hardware acceleration under various environments wich is ofcourse completly unacceptable performance wise.

>BTW, your demos are very impressive.  Some of them are a bit jumpy/choppy
>and I am not sure if that is inherent in the performance of the demo or whether
>it's just the video that's choppy.

The "choppyness" comes from the recompression when uploading the video to youtube. When running the demos live in realtime most of them are running in a couple of hundred fps without v-sync and when enabling v-sync u get ofcourse rock solid 60 fps.

ps. Michael and Sven are currently on the Siggraph 2010 to do some pr-stunt for jogl/jocl. So have a little patience :)