I’ve been using a GLCanvas to render my JOGL scenes so far, and wrapping it’s drawable in a DebugGL to catch errors. I’ve never had any OpenGL errors yet, but figured that this would be a good safety practice while I’m still writing and debugging my code.
Recently, I decided to switch to the lightweight GLJPanel so that I can display popup menus over my panel. I wrapped my GLJPanel’s drawable in a DebugGL just as I did for my GLCanvas:
canvas = GLDrawableFactory.getFactory().createGLJPanel(new GLCapabilities());
canvas.setGL(new DebugGL(canvas.getGL()));
However, this is throwing the following exception:
java.lang.IllegalArgumentException: null downstreamGL
at net.java.games.jogl.DebugGL.<init>(DebugGL.java:20)
at com.pantometrics.display.PantoSceneViewPanel.<init>(PantoSceneViewPanel.java:60)
Any ideas what’s causing this? Can I use a DebugGL with a GLJPanel?