I’m wondering how I should do rendering with my game loop when using jogl. Right now I have a loop that goes through and does all the usual stuff:
handle input
update logic
render
This works fine for java2D obviously, but I’m not sure how to do this with jogl. I could just use tha Animator but then rendering is on a seperate thread from logic updates etc. and I dont want that. From what I know, the Animator just repeatedly calls display(GLDrawable drawable), however I don’t know if it is safe for me to call display(myGLCanvas). Will my old game loop work if I just replace the call to my render() method with a call to display(myGLCanvas)?
I read in another post that everything is done in display(), does this mean I should just use display for my gameloop and do logic updates, input handling, and whatever else from here and just let the animator update it?
My other concern with doing it this way is whether the Animator (I’m actualy using FPSAnimator) is going to have millisecond accurate timing like I could get from using GAGE Timer, and other features like catching up on frames if it gets behind and vsyncing.