Ok, how do you use OpenGL extensions?


New member
I'm lost, confused, ect. . . I'm trying to implement ATI object arrays, but can't figure out how to get the thing to work! I keep on getting the following error:

error C2065: 'glNewObjectBufferATI' : undeclared identifier

Any help or links tutorials on using extensions?
First of all you need to check whether the card supports that extension at runtime, this can be done with glGetString(GL_EXTENSIONS), parse it for "GL_ATI_vertex_array_object".

Then if it's supported you'll need to load the function. Those function aren't defined anywhere since they are an extension, thus you'll need to define them yourself, best is to just rip stuff from glATI.h available at ATi's developers site. The you load the function pointers with wglGetProcAddress().

You may want to check how I am doing stuff in my glExtensions.h file at my site. Go here:
Click the download link at the top of the page.
Ok, I think I've got setting up the extensions understood. Now I just keep on getting Access Violation errors when I try and use the glArrayObjectATI function.

Unhandled exception in Dragon.exe (ATIO9XXX.DLL): 0xC0000005: Access Violation

Then it sends me to some assembly code (which I don't know how to read). :/