Should I use ARB or NON arb functions?

I’m trying to get Vertex Buffer objects running in jogl on some older hardware, and I’m finding that it’s tedious to be checking if all these functions are even supported…

My guess is that I have to check if the non-arb isSupported, then if not, try the arb issupported, then crash, or use a slow workaround that doesn’t use the extension.

I’m just wondering if jogl does that for me; so that I don’t have to write so much dern code.

Generally speaking, once the function has been included into the openGL spec, the ARB functions just point to a lot of the same code. However, if you’re looking for compatibility, ARB is generally a safer bet (since the ARBs usually come out first before getting included into the general spec).

There, was that vague enough? ::slight_smile:

I generally pick a certain “requirement” level for my games, say, openGL 1.5. If the function is contained within openGL before that version, I use the openGL call. Otherwise, I use ARB. With VBOs, you should be fine using the openGL spec (I think). Just check if the openGL version is supported first.

Hi!

I do this to check if I can use ARB VBO:

if((gl.isExtensionAvailable("GL_ARB_vertex_buffer_object")
                || gl.isExtensionAvailable("GL_EXT_vertex_buffer_object"))
                && (gl.isFunctionAvailable("glBindBufferARB")
                        || gl.isFunctionAvailable("glBindBuffer"))
                        && (gl.isFunctionAvailable("glBufferDataARB")
                                || gl.isFunctionAvailable("glBufferData"))
                                && (gl.isFunctionAvailable("glDeleteBuffersARB")
                                        || gl.isFunctionAvailable("glDeleteBuffers"))
                                        && (gl.isFunctionAvailable("glGenBuffersARB")
                                                || gl.isFunctionAvailable("glGenBuffers")))

My game uses display lists for static data when VBO are not available and vertex arrays for dynamic data. It is automatically handled in a separate package of my game in order to avoid to handle it explicitly everywhere in the source code. You can have a look. It allows my game to work even on some machines with OpenGL 1.2 ;D Mine is under OpenGL 1.3 and has VBO support (ATI Radeon 9250 Pro).