Error with Pixel Unpack Buffer Object

Hello everybody, I updated some nvidia drivers in my computer (Gentoo Linux x86_64) as well as checkout the new CVS version of jME and got the following error in lwjgl.



...
SEVERE: Exception in game loop
org.lwjgl.opengl.OpenGLException: Cannot use Buffers when Pixel Unpack Buffer Object is enabled
   at org.lwjgl.opengl.GLChecks.ensureUnpackPBOdisabled(GLChecks.java:120)
   at org.lwjgl.opengl.GL11.glTexImage2D(GL11.java:2699)
   at com.jme.scene.state.lwjgl.LWJGLTextureState.load(LWJGLTextureState.java:380)
        ...



And I did not found any info neither in Google nor jME. Thanks in advance.

well i am propably not much help, but you might want to take a look at:

http://www.opengl.org/documentation/specs/version2.1/glspec21.pdf



And there you see when the exception is thrown:

http://jsourcery.com/api/sourceforge/lwjgl/1.1/org/lwjgl/opengl/GLChecks.source.html


    static void ensureUnpackPBOdisabled(ContextCapabilities caps) {

        if ((caps.GL_ARB_pixel_buffer_object || caps.GL_EXT_pixel_buffer_object || caps.OpenGL21) && !checkBufferObject(caps, GL21.GL_PIXEL_UNPACK_BUFFER_BINDING, false)) throw new OpenGLException("Cannot use Buffers when Pixel Unpack Buffer Object is enabled");

    }



But of course i have no clue why this happens :)

Is this for all tests, or something specific?

@Core-Dump: Yeah!, I checked that much in Google, but it is not helping… tracing the error itself does not help much either, since it happens at the initialization point of the renderer. (while initializing the texture units and stuff.



@Renanse: Sadly yes, all tests :|. The renderer init is what fails… more detailed stack:


SEVERE: Exception in game loop
org.lwjgl.opengl.OpenGLException: Cannot use Buffers when Pixel Unpack Buffer Object is enabled
   at org.lwjgl.opengl.GLChecks.ensureUnpackPBOdisabled(GLChecks.java:120)
   at org.lwjgl.opengl.GL11.glTexImage2D(GL11.java:2699)
   at com.jme.scene.state.lwjgl.LWJGLTextureState.load(LWJGLTextureState.java:380)
   at com.jme.scene.state.lwjgl.LWJGLTextureState.<init>(LWJGLTextureState.java:206)
   at com.jme.renderer.lwjgl.LWJGLRenderer.createTextureState(LWJGLRenderer.java:331)
   at com.jme.renderer.lwjgl.LWJGLRenderer.<init>(LWJGLRenderer.java:187)
   at com.jme.system.lwjgl.LWJGLDisplaySystem.createWindow(LWJGLDisplaySystem.java:144)
   at com.jme.app.BaseSimpleGame.initSystem(BaseSimpleGame.java:341)
   at com.jme.app.BaseGame.start(BaseGame.java:65)
   at jmetest.intersection.TestCollision.main(TestCollision.java:91)
Oct 9, 2007 4:52:58 PM com.jme.app.BaseSimpleGame cleanup
INFO: Cleaning up resources.
Oct 9, 2007 4:52:58 PM com.jme.app.BaseGame start
INFO: Application ending.

Seems like your card is improperly reporting the status of GL21.GL_PIXEL_UNPACK_BUFFER_BINDING?  You might try playing around with manually changing the value of that?

Sorry for the belated reply… I have checked the output of glxinfo and it does not report anything to do with the GL_PIXEL_UNPACK_BUFFER_BINDING constant.


    GLX_EXT_fbconfig_packed_float, GLX_EXT_texture_from_pixmap,
    GL_EXT_packed_depth_stencil, GL_EXT_packed_pixels,
    GL_NV_multisample_filter_hint, GL_NV_packed_depth_stencil,



This is the only thing reported that has anything to do with pack. An this is the buffer part:

    GLX_SGIX_pbuffer, GLX_SGI_video_sync, GLX_SGI_swap_control,
    GLX_EXT_texture_from_pixmap, GLX_ARB_multisample, GLX_NV_float_buffer
    GLX_NV_swap_group, GLX_NV_video_out, GLX_SGIX_fbconfig, GLX_SGIX_pbuffer,
    GLX_SGI_swap_control, GLX_NV_float_buffer, GLX_ARB_fbconfig_float,
    GLX_EXT_framebuffer_sRGB
    GLX_SGIX_pbuffer, GLX_SGI_video_sync, GLX_SGI_swap_control,
    GLX_EXT_texture_from_pixmap, GLX_ARB_multisample, GLX_NV_float_buffer,
    GL_ARB_multitexture, GL_ARB_occlusion_query, GL_ARB_pixel_buffer_object,
    GL_EXT_paletted_texture, GL_EXT_pixel_buffer_object,
    GL_KTX_buffer_region, GL_NV_blend_square, GL_NV_copy_depth_to_color,
    GL_NV_depth_clamp, GL_NV_float_buffer, GL_NV_fog_distance,



I agree there seems to be a driver problem, though.  :|

Im having something similar to it running on ubuntu …


SEVERE: Exception in game loop
org.lwjgl.opengl.OpenGLException: Invalid operation (1282)
   at org.lwjgl.opengl.Util.checkGLError(Util.java:50)
   at org.lwjgl.opengl.Display.swapBuffers(Display.java:606)
   at org.lwjgl.opengl.Display.update(Display.java:625)
   at com.jme.renderer.lwjgl.LWJGLRenderer.displayBackBuffer(Unknown Source)
   at com.jme.app.BaseGame.start(Unknown Source)
   at com.sioti.client.Client.main(Client.java:59)
Apr 27, 2008 2:06:30 PM com.jme.app.BaseGame start



any toughts ?

Same problem for me on Ubuntu (Hardy Heron).



Anyone had found a solution ?



Edit : i tried Beta and recommended drivers (8800 GTS), same problem.



I searched a little more : 



http://lwjgl.org/forum/index.php/topic,2537.0.html



Nothing really interresting…



Last Edit : I builded a new kernel and now it works  !!!

The problem is with the permissions on /dev/nvidiactl

If you do a glxinfo - you would probably see something like:



NVIDIA: could not open the device file /dev/nvidiactl (Permission denied).

NVIDIA: Direct rendering failed; attempting indirect rendering.



try

sudo chmod o+rw /dev/nvidiactl



to make things happy.