Login  Register

Re: Why is my display function not called continuously to update new camera position

Posted by jmaasing on Nov 10, 2017; 6:30am
URL: https://forum.jogamp.org/Why-is-my-display-function-not-called-continuously-to-update-new-camera-position-tp4038311p4038312.html

tragic_xxx wrote
updated. In fact the problem is the display() function is not not called continuously so the rendered scene doesn't  reflect the new camera position
You need to have something calling display several times. You need to use an animator.

https://jogamp.org/deployment/v2.1.3/javadoc/jogl/javadoc/com/jogamp/opengl/util/Animator.html

"To perform animation, we need an animator to drive the drawable's display() method in a loop to refresh the display regularly."
https://www.ntu.edu.sg/home/ehchua/programming/opengl/JOGL2.0.html