Since the question of the usage of OGL-extensions pops up from time to time, I tried to provide a simple solution to this problem.
I have made a header-file similar to the glext.h from SGI. It allows you to
use the functions-pointers provided by the extensions as ordinary function
calls without any overhead (except for the first call of the function):
So you can write:
... glActiveTextureARB(GL_TEXTURE1_ARB); ...
... // declare function pointer GLACTIVETEXTUREARBPROC glActiveTextureARB = 0; ... // init function pointer glActiveTextureARB = (GLACTIVETEXTUREARBPROC)wglGetProcAddress(...); ... // use function pointer (*glActiveTextureARB)(GL_TEXTURE1_ARB); ...
Most of the NVidia extensions (cube map, texture compression, register
combiners, …) are contained. If there are some other usefull extensions
missing, email me and I add them.
What do you think? Is it usefull? Could/should it be improved?