Re: GLJPanel for LibGDX JOGL backend

Posted by adam_law on
URL: https://forum.jogamp.org/GLJPanel-for-LibGDX-JOGL-backend-tp4034741p4034936.html

gouessej wrote
Actually, if you set the exclusive thread correctly, you can improve the frame rate and get rid of the nasty exception. Set it in GLEventListener.init() and let me know the results.
Sorry to only get to this now, I thought you were resting from this case :))

You're right, I actually came around today to tell you that I found out why the FPS was so low when I used -javafx.embed.singleThread=true: I had another instance running XD I guess it's because they're sharing the GPU? Using only one instance at a time has FPS around 18-23, and yes, the exception is prevented.

I'm not sure how to call/use GLEventListener.init()? My instantiation just involves using JoglSwingCanvas and passing JoglSwingCanvas.getCanvas to SceneNode. Do you mean I should do this through the source code?

gouessej wrote
You can call animator.setExclusiveContext(true) but there is a risk of deadlock when the animator is used with GLCanvas or GLJPanel.
Same here? The only animator I can find is from JoglSwingCanvas.getGLCanvas().getAnimator(), but it doesn't have the method.

Sorry for not getting it right away. Thanks for the suggestions!