Hello, Y’m implemetoing some renter to VBO with JOGL. I’m using the method:
- Render to FBO
- Transfer to VBO
The code in javais just a JOGLversion of the that I use in C++:
//Inside transferiDatos()
this.sistemaGrafico.glBindFramebufferEXT( GL.GL_FRAMEBUFFER_EXT, fbo.ID[0]);
this.sistemaGrafico.glReadBuffer( GL.GL_COLOR_ATTACHMENT0_EXT );
this.sistemaGrafico.glBindBuffer(GL.GL_PIXEL_PACK_BUFFER, vbo[0]);
this.sistemaGrafico.glBufferData(GL.GL_PIXEL_PACK_BUFFER, fbo.width*fbo.height*4*4,null, GL.GL_STATIC_DRAW );
this.sistemaGrafico.glReadPixels( 0,0, fbo.width, fbo.height, GL.GL_RGBA, GL.GL_FLOAT,null);
this.sistemaGrafico.glReadBuffer(GL.GL_NONE);
this.sistemaGrafico.glBindBuffer(GL.GL_PIXEL_PACK_BUFFER, 0 );
, where this.sistemaGrafico is a GL object. But I’m getting this exception:
Exception in thread "AWT-EventQueue-0" javax.media.opengl.GLException: pack pixel_buffer_object must be disabled to call this method
at com.sun.opengl.impl.GLImpl.checkBufferObject(GLImpl.java:30668)
at com.sun.opengl.impl.GLImpl.checkPackPBODisabled(GLImpl.java:30695)
at com.sun.opengl.impl.GLImpl.glReadPixels(GLImpl.java:17459)
at com.fractal.Aplicacion.transferirDatos(Aplicacion.java:374)
at com.fractal.Aplicacion.hazTodoElCalculo(Aplicacion.java:153)
at com.fractal.Aplicacion.init(Aplicacion.java:451)
at com.sun.opengl.impl.GLDrawableHelper.init(GLDrawableHelper.java:72)
at javax.media.opengl.GLCanvas$InitAction.run(GLCanvas.java:418)
at com.sun.opengl.impl.GLDrawableHelper.invokeGL(GLDrawableHelper.java:189)
at javax.media.opengl.GLCanvas.maybeDoSingleThreadedWorkaround(GLCanvas.java:412)
at javax.media.opengl.GLCanvas.display(GLCanvas.java:244)
at javax.media.opengl.GLCanvas.paint(GLCanvas.java:277)
at sun.awt.RepaintArea.paintComponent(RepaintArea.java:248)
at sun.awt.X11.XRepaintArea.paintComponent(XRepaintArea.java:56)
at sun.awt.RepaintArea.paint(RepaintArea.java:224)
at sun.awt.X11.XComponentPeer.handleEvent(XComponentPeer.java:683)
at java.awt.Component.dispatchEventImpl(Component.java:4486)
at java.awt.Component.dispatchEvent(Component.java:4240)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)
I don’t know what is going on. Please, some help please.