opengl 1.4 / 1.5 problems (VBO)

My “Jack Flowers” game (http://www.javapause.com/games/jack) is based on Xith and jogl - jsr231

Some users with intel gfx boards have problems with VBO :

  • OpenGLExtensions.GL_ARB_vertex_buffer_object is true
  • the API is OpenGL 1.4??? and so glGetBufferParameteriv is not defined for that chip and the game crashes in ShapeAtomPeer.bindGeometryComponent

As a workaround I’ve disabled the render Option.USE_VERTEX_BUFFER_CACHING for OpenGL 1.4 … but shouldn’t it be made as default ?

As the opengl version is hidden inside the CanvasPeerImpl, I’ve added the following code into it (in the init(GLAutoDrawable) method, before displaying the extensions) :


if (openGlVersion.startsWith("1.4")){
        if (showInfos){
              System.out.println("OpenGL 1.4 detected : disabling Vertex Buffer Caching");
            }
            getRenderOptions().setOption(Option.USE_VERTEX_BUFFER_CACHING, false);
}

Does it seems good to you ? or do I miss something ?

Lilian

My understanding is that VBO worked with NVideo and ATI cards running OpenGL 1.4, though I could be mistaken. If I’m correct, perhaps the better test would be to test for the intel boards and adjust accordingly.

We don’t have to have it set to true as default, after some initial problems no-one has complained in quite a while though.

Could this be a new problem with the JSR231 renderer do you think?

Cheers,

Will.

PS. Where do I play your game? I visited the web site but couldn’t see a link to launch the game (OSX 1.4, Camino browser).

There is an applet to start the game in the center of the page… if you don’t see it, go directly there http://www.javapause.com/games/jack/jackApplet.php (but you won’t be able to select resolution and antialiasing). … it’s strange that you don’t see the applet … I’ll have to investigate

about Vertex Buffer caching : I’ve just ported the existing code for that class… and something is sure : glGetBufferParameteriv is defined only for OGL 1.5 (at least it’s not in the red book for 1.4).

As ATI and NVIDIA are generally GL 1.5 compliant, the problem might occur only with these intel chips…

Lilian

Buffer objects got in GL core at version 1.5. Therefore, when ARB_vertex_buffer_object is exposed and the available GL version is 1.4, no core function should ever be called. In this particular case, glGetBufferParameterivARB should have been used instead (the extension function, not the core one).

I don’t know if this ARB function is still part of JSR231… I’ll look into that.

Lilian

It seems that there has been some problem with integration of core functions in some drivers for OpenGL 1.4.

The link below is from a discussion where ‘Humus’ (a very talented programmer) explain while he had to use the extensions instead of the core functions.

Question :
http://www.humus.ca/index.php?page=Comments&ID=156&start=1

Answer:
http://www.humus.ca/index.php?page=Comments&ID=156&start=12

I don’t know if this is directly linked with the problem Lilian has.

         Vincent

You’re right, I’ll change the ShapeAtomPeer to use ARB instead, as they’re still here in jsr231.

Lilian