ARB extensions

I’m making a demo, and I’m trying to use ARB extensions.
I know how to implement that code, but
what I have to do to complie it?



What sort of trouble are you having? You will probably need to get glext.h, and declare and initialize all relevant function pointers, but beyond that there shouldn’t be anything tricky.


Ok, now I have glext.h …but…
what I have to do, to declare and initialize function pointers?


First, look in the header file for the extension function you want to use. They are declared as a typedef with the name PFN<extensionname>PROC and some parameters. Use this to declare a pointer, and then use wglGetProcAddress to obtain the pointer.

glArrayElementEXT =wglGetProcAddress(“glArrayElementEXT”);
if(glArrayElementEXT == NULL) return; // didn’t load the functiopointer…
// if we get here, we have a pointer to use

You can, of course, call the functionpointer whatever you wan…

where do I get glext.h?
And what if there are new extensions coming out?
Is there a place where I can get always the
newest/ updatred glext.h file


look in the faq on this site.