JOGL & AWT Event-Queue

Dear All,

I am using a GLCanvas to render my scene. The application we are developing deals with huge models with over than 350,000 complex objects all loaded.

High FPS and good quality are requirements. So far these are provided. One problem i am facing is when we have to render progressivly all the objects in frustrum.

This option will slow down all the GUI of the application, in case I have a JTable displayed and a menu bar and the interaction is done between the JTable and the scene. the GUI freezes each time the scene is to be redrawn.

This is because the GLCanvas display is included in the AWT-EventQueue thread which is shared with the gui.

I know that this is from the concept that a canvas is another GUI in the app which is essential for all the interaction swing/jogl etc. but is there a way that I can define that JOGL runs in a different thread that AWT-Event Queue and if there is not can this feature be added as an option!

And will this option have any pitfulls?

Thanks

I think the -Dopengl.1thread=worker switch from https://jogl.dev.java.net/issues/show_bug.cgi?id=191 might solve your problem. But there were issues with this, so it is no longer the default: http://www.java-gaming.org/index.php?topic=13421.0. But it may be worth to try it out.

Thanks cylab, but it seems that the worker is a blocker thread on awt so it didnt solve the problem. And i have noticed that it creates a slow interaction with awt. Can u please specify what were the issues with it and if any development will be done on this option.

What do you mean with “the worker is a blocker thread on awt”? Maybe your rendering is just eating away all CPU resources, causing a sluggish behaviour. Sometimes also exessive file IO can cause slow or blocking behaviours on different threads.

The known issues with the worker thread are afaik all related to opengl driver robustness. I don’t think there is any development planned on this option atm.

I mean that when i use this option

which makes the rendering as u stated run on a different thread.

But when i use this option the GUI of my application go slow even when i have nothing drawn on scene?

Try using an FPSAnimator. Chances are that the Animator is running at full speed and eating 100% CPU time.

FPS Animator eats the CPU usage i wrote another animator for my application which ensure that at max 60% of the CPU is used at any case … even when models grow complex and huge like 350000 complex object for rendering)

If you limit the CPU usage while rendering, the GUI should not slow down… sorry, I have no idea, what your problem might be. You should create a small testcase to reproduce the problem and file a bug with this testcase attached.