glTexImage3D Problem

Hello,

I have “glext.h”, and GL_TEXTURE_3D is defined in the header file. The problem is, is when I try to Texture my Image using 3D, not 2D, it does not like the function glTexImage3D. I checked in my header file and it is in there, but my compiler can’t find the function. Also, the function GL_TEXTURE_3D is found by the compiler, but not glTexImage3D. Why?

error C2065: ‘glTexImage3D’ : undeclared identifier

  • VC6-OGL

That particular error is associated with declaration of variables. You still need to declare the function as an extension prototype:

PFNGLTEXIMAGE3DPROC glTexImage3D = NULL;

Then in your implementation:

glTexImage3D = (PFNGLTEXIMAGE3DPROC)wglGetProcAddress(“glTexImage3DEXT”);

It should work after that.

[This message has been edited by shinpaughp (edited 01-17-2003).]