Couple of questions
Posted by tomd on Nov 12, 2010; 2:53pm
URL: https://forum.jogamp.org/Couple-of-questions-tp1889246.html
I have the gears demo running in the main window of my existing application, which is a great step forward. Just a couple of questions.
My application is largely static, the scene changes rarely. It seems quite wasteful to redraw the frame over and over when it isn't even changing. But I can't seem to get GLCanvas to paint itself outside of the Animator - I get null pointers because the canvas doesn't appear to be fully initialised. Is it possible to just draw the canvas once, without the animator?
Also, I notice in the gears example, the mouse handler updates xRot amd yRot, which the display callback uses to position the gears. Is that thread safe, there is no synchronisation? Not sure if it is just to keep the example simple, or if there is a reason the two areas of code can't trip each other up?