Re: converting from Sun's jogl to jogamp's jogl -- HELP
Posted by Alexandra on Mar 24, 2011; 12:29am
URL: https://forum.jogamp.org/converting-from-Sun-s-jogl-to-jogamp-s-jogl-HELP-tp2715969p2723173.html
So I thought that maybe the problem was I was calling glDeleteBuffers from the mouseDragged function and the GLContext might only be current in the init( GLAutoDrawable ) or display( GLAutoDrawable ) functions. So I delayed calling glDeleteBuffers until the display() function... Here's my new exception:
Caused by: javax.media.opengl.GLException: This GL object is being incorrectly used with a different GLContext than that which created it
at javax.media.opengl.DebugGL2.checkContext(DebugGL2.java:32466)
at javax.media.opengl.DebugGL2.glDeleteBuffers(DebugGL2.java:13932)
Any ideas?
I think the problem is with shared contexts where the shared vertex buffer is modified, the shared texture is deleted then reloaded. When I call glTexSubImage to modify a shared texture it works. But if I want to swap out a shared texture completely I get an error.
This worked with Sun's JOGL so I think this is a jogamp bug.