I’m building a GLCanvas-based application in NetBeans 5.0, and when I place a GLCanvas on the visual editor, the editor no longer draws, due to the exception given below. Curiously, this does not happen for a GLJPanel… At any rate, does anyone know of a fix for how to prevent this? Or, for that matter, is there a way to tell the canvas to just not render or something (but still show its boundaries for the visual editor)? Now I can just set it to not visible, edit the rest of the GUI, and then set it to visible when I’m done, but that screws up the layout and everything, making it not quite as useful…
javax.media.opengl.GLException: Unable to lock surface
at com.sun.opengl.impl.windows.WindowsOnscreenGLDrawable.lockSurface(WindowsOnscreenGLDrawable.java:169)
at com.sun.opengl.impl.windows.WindowsOnscreenGLContext.makeCurrentImpl(WindowsOnscreenGLContext.java:57)
at com.sun.opengl.impl.GLContextImpl.makeCurrent(GLContextImpl.java:118)
at com.sun.opengl.impl.GLDrawableHelper.invokeGL(GLDrawableHelper.java:182)
at javax.media.opengl.GLCanvas.maybeDoSingleThreadedWorkaround(GLCanvas.java:258)
at javax.media.opengl.GLCanvas.display(GLCanvas.java:130)
at javax.media.opengl.GLCanvas.paint(GLCanvas.java:142)
… the rest down are about 20 or 30 regular swing and awt paint/graphics calls - I can’t copy/paste from that window, some I’m not going to transcribe the rest…