PDA

View Full Version : Using Extensions



Anders
02-11-2002, 05:00 AM
Hi, I'm dabling with the openGL extensions for the first time, and I have some problems with getting them to work. First off, how do I instruct the program that I want to use a certain extension? I'd like to use the GL_SGIX_depth_texture extension and its token GL_DEPTH_COMPONENT24_SGIX in a glCopyTexImage2D function call. The idea for this function call is, that I want to copy the depth information in an image directly into texture memory, so that I don't have to use glReadPixels first.
The compiler tells me that GL_DEPTH_COMPONENT24_SGIX is an undeclared identifier. When I use the glut call glutExtensionSupported to find out if I have that extension, the answer is no. Why?

I'm running on a win98 machine with a GeForce1 256, so the extension should be supported. I do have the latest drivers from Nvidia for openGL 1.2 & 1.3 support. Do I need to obtain a specific gl.h file? So if anyone can give me some pointers on how to work with extensions, please post them here. I know this may sound cryptic, so if there is any additional info you need to answer my question, please don't hesitate to ask http://www.opengl.org/discussion_boards/ubb/smile.gif

Thx in advance

Bob
02-11-2002, 05:13 AM
GeForce 1, 2 4MX does not support that extension. Only GeForce 3 and 4Ti.

Anyways, for extension specific stuff you need another header file. Go to NVIDIA's developer side and search for an extension header file (glext.h).

jwatte
02-11-2002, 11:52 AM
I usually don't get the other header files, but instead define my own header file with precisely the extensions that I need. That way, I don't create outside dependencies in my code, and I know exactly what's going on.