In past code, I was able to use glReadPixels in my render loop. I am now using a cvs build of the jsr231, and when I use this function, I get this error.
Exception in thread “Thread-1” javax.media.opengl.GLException: javax.media.opengl.GLException: Required extensions not available to call this function
at javax.media.opengl.Threading.invokeOnOpenGLThread(Threading.java:205)
at javax.media.opengl.GLCanvas.maybeDoSingleThreadedWorkaround(GLCanvas.java:234)
at javax.media.opengl.GLCanvas.display(GLCanvas.java:127)
at com.sun.opengl.util.Animator.display(Animator.java:144)
at com.sun.opengl.util.Animator$MainLoop.run(Animator.java:181)
at java.lang.Thread.run(Thread.java:595)
Caused by: javax.media.opengl.GLException: Required extensions not available to call this function
at com.sun.opengl.impl.GLImpl.checkBufferObject(GLImpl.java:27997)
at com.sun.opengl.impl.GLImpl.checkPackPBOEnabled(GLImpl.java:28036)
at com.sun.opengl.impl.GLImpl.glReadPixels(GLImpl.java:15962)
at fitsrender.io.IO3D.getMousePos(IO3D.java:101)
at fitsrender.RenderGLEvent.display(RenderGLEvent.java:250)
at com.sun.opengl.impl.GLDrawableHelper.display(GLDrawableHelper.java:77)
at javax.media.opengl.GLCanvas$DisplayAction.run(GLCanvas.java:259)
at com.sun.opengl.impl.GLDrawableHelper.invokeGL(GLDrawableHelper.java:128)
at javax.media.opengl.GLCanvas$DisplayOnEventDispatchThreadAction.run(GLCanvas.java:276)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:199)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:234)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
BUILD SUCCESSFUL (total time: 6 seconds)
I have tried putting this funtion elsewhere in code, but to no effect. It is currently in the render loop, so this shouldn’t be a threading issue. And it was working with the older jogl’s flawlessly, I just don’t know what library release was the last one it worked with. It has not worked with any of the jsr’s I have tried.
All my other code ported seamlessly, and to try and fix the error, I also tried loading my textures with the textureIO, but I got the same results. I really like the textureIO by the way. Great job.
Greg