Re: Simple example with NEWT but without animator
Posted by
Sven Gothel on
Nov 12, 2013; 10:33am
URL: https://forum.jogamp.org/Simple-example-with-NEWT-but-without-animator-tp4030571p4030597.html
On 11/12/2013 11:05 AM, elect [via jogamp] wrote:
> gouessej wrote
> You have to call JOGL methods on the right thread, when the OpenGL context
> is current (use invoke()). If you try to reinvent the wheel, you will have
> the same problems than me when I ported Ardor3D to JOGL 2.x but the
> difference is that:
> - maybe it will be impossible to fix some of them without breaking your
> code design
> - your framework is your problem, your responsibility
>
> Don't use animators if and only if you really know what you're doing.
>
> The main reason why I want to avoid using an animator, is because I want to
> avoid useless rendering if nothing changes, I know that for this project is
> pretty useless, but I would like to have a solid layout for more complex
> projects.
>
Well, you simply can do things w/o an animator and just call
'GLAutoDrawable.display()' if you need to update the scene on the screen.
Then 'GLAutoDrawable.display()' is also being called when the (native) window
needs a refresh (resize .. whatever).
Of course, you could also use an animator if you like to animate for
a period of time and then pause animation, hence there is a 'pause()'
and 'resume()' method in GLAnimatorControl.
In short: Animator is optional of course.
> I wonder why the animator is so diffuse
I don't understand this statement. What is not clear about it ?
~Sven