Re: Incorrect context on GLCanvas drawable
Posted by
Martin on
Sep 13, 2022; 1:53pm
URL: https://forum.jogamp.org/Incorrect-context-on-GLCanvas-drawable-tp4041391p4041869.html
Hi Marco,
I have no explanation for the GLJPanel working better than GLCanvas.
What I can say is that GLCanvas is the historical JOGL canvas which -at least some years ago- was performing on-screen rendering and not able to have Swing components rendering on top of it. GLJPanel arrived later and looking at its source code you should see that it performs offscreen rendering using an FBOBuffer, hence allowing to simply display a BufferedImage in a canvas, hence dealing with Swing components rendered on top of it. Nothing relating to your problem but a different way of working :)
I agree that fixing this would be great. However I think a major locker on improving JOGL is the pain to build and test it on so many platforms. In 2022 there are new things in the JVM that could allow to only deal with Java code when trying to invoke native OpenGL instead of using JNI+Glugen native binding. In my opinion, simplifying the low level layers of JOGL first would help having more contributors working on it.
I have
tried this here if you are interested. I believe switching to such binding would allow to only work with Java code in JOGL rather Java+C code making it so painful and time consuming to build!
Best,
Martin