PDA

View Full Version : ARB extensions



shoot
10-09-2000, 03:05 PM
Hello!
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?

Thanks
MARC

cass
10-09-2000, 03:50 PM
Shoot,

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.

Cass

shoot
10-09-2000, 04:00 PM
Ok, now I have glext.h ...but...
what I have to do, to declare and initialize function pointers?

shoot

Bob
10-09-2000, 11:53 PM
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.




PFNGLARRAYELEMENTEXTPROC *glArrayElementEXT;
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...

d_christop
10-10-2000, 02:02 AM
Hey,
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

Cheers

Don't Disturb
10-10-2000, 03:38 AM
look in the faq on this site.