Hi everybody. I have this little problem
I am using GLJPanel in some kind of 3D editor application. But when I drag some object with the mouse, the response of the application is slow and the dragged object is moving slower then the mouse cursor. In this kind of application I do not need a callback rendering so I am calling GLJPanel.display() method on the end of my mouseMoved() method. I figured out that rendering of the scene (in my display() method) lasts only 0.2 milisecond but execution of GLJPanel.display() takes 20 miliseconds in avarage. This delay causes the scene to update slower than the cursor is moving.
So I am asking, is there any way to avoid such long execution time of the GLJPanel.display() method? I would like to consider perhaps some active rendering approach since I actually do not need callback rendering with another thread. I would like the OpenGL context to be current on the event processing thread.
I tried active rendering described in O’Reilly’s book “Killer Game Programming in Java”, but he uses AWT Canvas and since it is a heavyweight component it does’t really fit into my application.
Any ideas how to better the performace without giving up on GLJPanel?
Thanks for any response…