What Are These Extensions?

I was taking a look at gl.h file, and at the end of the file I found a part called Extensions and it contained 6 extensions with all their new tokens(defines and functions).
which are :

so… Are these 6 extensions supported by all cards(i’m saying so coz they are defined in gl.h not in glext.h like any other new extension) ?

also i found some strange #define’s like GL_TEXTURE_BINDING_1D & GL_TEXTURE_BINDING_2D and I found no info about them in MSDN, does anyone know their use?

Hi !

Extensions are just extensions, so they may or may not be available, but many extensions become standard features in later OpenGL versions, and then the constants are put inside gl.h to make them available.

MSDN is not a good place to look for any OpenGL information beyond 1.1, use this site or something else to lookup up to date OpenGL documentation.


Trying to get my head around extensions, am I right to assume that the enumerants that made it to the gl core are available on all cards supporting that particular gl version in which the enums were promoted to core?

For example, EXT_BGRA extension made it to 1.2 core so I no longer need to check for the extension string if I detect user is running 1.2 and above driver? I understand that I should still check function pointer for NULL since even if the feature is part of gl version my gfx card advertizes my gfx card still might not support that feature. Thanks.

Hello. Sorry for breaking in your topic but I also have a question about extensions. I know it will sound silly - what are extensions generally? I’m begginer to OpenGL and I don’t know what are they. Could anyone explain me it shortly? Thanks

Specifications of all extensions can be found at the OpenGL Extension Registry, which should be here : http://oss.sgi.com/projects/ogl-sample/registry

GL_TEXTURE_BINDING_1D and -2D are queries for textures.

When you call :
glBindTexture(GL_TEXTURE_1D, 1234);

You can later know which texture was bound, by calling :
GLint texture_id;
glGetIntegerv(GL_TEXTURE_BINDING_1D, &texture_id);
printf("id == %d
", texture_id);

It will print :
id == 1234