Re: GLJPanel for LibGDX JOGL backend
Posted by adam_law on Aug 03, 2015; 10:12pm
URL: https://forum.jogamp.org/GLJPanel-for-LibGDX-JOGL-backend-tp4034741p4035022.html
Yikes. I totally missed GLJPanel being a GLAutoDrawable XD
I tried as you've directed, but, doing
Animator anim = new Animator();
anim.setExclusiveContext(true);
anim.add(joglSwingPanel.getGLCanvas());
or
Animator anim = new Animator(joglSwingPanel.getGLCanvas());
anim.setExclusiveContext(true);
it throws this error.
Exception in thread "JavaFX Application Thread" com.jogamp.opengl.GLException: Trying to register GLAnimatorControl com.jogamp.opengl.util.Animator[started false, animating false, paused false, drawable 1, totals[dt 0, frames 0, fps 0.0], modeBits 1, init'ed true, animThread null, exclCtxThread true(null)], where com.jogamp.opengl.util.Animator[started true, animating true, paused false, drawable 1, totals[dt 0, frames 1, fps 0.0], modeBits 1, init'ed true, animThread Thread[JavaFX Application Thread-AWTAnimator#00,5,main], exclCtxThread false(null)] is already registered. Unregister first.
Edit: didn't mean to add setRunAsFastAsPossible(). it wasn't part of my attempt that generated the error. thanks.