PDA

View Full Version : What Are These Extensions?



xee
04-13-2003, 06:00 PM
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 :
GL_EXT_vertex_array
GL_EXT_bgra
GL_EXT_paletted_texture
GL_WIN_swap_hint
GL_WIN_draw_range_elements

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?

mikael_aronsson
04-13-2003, 09:49 PM
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.

Mikael

JD
04-13-2003, 11:05 PM
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.

04-15-2003, 11:52 AM
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 http://www.opengl.org/discussion_boards/ubb/smile.gif

vincoof
04-15-2003, 01:01 PM
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\n", texture_id);

It will print :
id == 1234