Error swapping buffers

Hello,

Almost every time I close my program that uses JOGL, i get the following error:

net.java.games.jogl.GLException: Error swapping buffers
at net.java.games.jogl.impl.windows.WindowsOnscreenGLContext.swapBuffers(WindowsOnscreenGLContext.java:140)
at net.java.games.jogl.impl.GLContext.invokeGL(GLContext.java:236)

Is there some code I should run before closing the window and doing System.exit(0) ?

Oops, that wasn’t the entire error message. It should’ve been:

net.java.games.jogl.GLException: Error swapping buffers
at net.java.games.jogl.impl.windows.WindowsOnscreenGLContext.swapBuffers(WindowsOnscreenGLContext.java:140)
at net.java.games.jogl.impl.GLContext.invokeGL(GLContext.java:236)
at net.java.games.jogl.GLCanvas.displayImpl(GLCanvas.java:182)
at net.java.games.jogl.GLCanvas.display(GLCanvas.java:82)

Try calling stop() on your Animator before calling System.exit().

I am using Xith3D (with JOGL) and get the same error. I can’t find where I should call the stop() method you mentioned. Could you please clarify this, thank you?

Try posting on the Xith3D forum.