Re: JOGL 2.4 - Canvas White Screen
Posted by
gouessej on
Mar 23, 2019; 11:02pm
URL: https://forum.jogamp.org/JOGL-2-4-Canvas-White-Screen-tp4039645p4039646.html
Hello
At first, there is no JOGL 2.4 yet despite what is printed in the debug output. The latest version available right now is JOGL 2.3.2. You posted a link to a build of JOGL 2.3.2 with a few changes.
Please provide a SSCCE to reproduce your problem.
By the way, your source code violates some important principles. You mustn't store a GL instance into a field because it can get invalidated and you could be tempted to use it either when it's no longer valid or when you're not on the thread on which it's current. Rather use the static method GLContext.getCurrentGL(), use it only when you're sure that the OpenGL context is current, preferably in a GLEventListener.
I advise you to look at my source code as JogAmp's Ardor3D Continuation has to do something similar and JogAmp's Java3D 1.7 too. I remember that something changed in the threading between JOGL 1 and JOGL 2, I had to take that into account when porting Ardor3D from JOGL 1 to JOGL 2.