3d texturing, where is it defined?

the pointer to the function glTexImage3D is NULL, so i guess i should init it like it was an extension, but i get an unresolved external -

error LNK2001: unresolved external symbol “void (__stdcall* glTexImage3D)(unsigned int,int,int,int,int,int,int,unsigned int,unsigned int,void const *)” (?glTexImage3D@@3P6GXIHHHHHHIIPBX@ZA)

am i missing some files that should be included maybe? i include the glExt.h.

thnx in advance.

the glExt.h

which one? there are so many out there…
I recommend that you grab this kind of files at your IHV’s website (NVIDIA, ATI…)
They are likely to have the most up-to-date OpenGL extensions headers.

(Yes, 3D texturing is a core feature since OpenGL 1.2, but for Windows, you have to load it as an extension)

It may be defined as


and all of its relatives may have EXT, such as GL_TEXTURE3D_EXT

so remove the EXT. Also note that some cards dont have the normal ones but have EXT, for some its the inverse, (some may have both ?)

This is what my glext.h says


/* Header file version number, required by OpenGL ABI for Linux /
glext.h last updated 2002/03/29 /
Current version at http://oss.sgi.com/projects/ogl-sample/registry/ */


glTexImage3DEXT is the function that corresponds to the GL_EXT_texture3D extension

since it is a core feature for OpenGL 1.2 and above, if you have a proper driver (ie glGetString(GL_VERSION) returns 1.2 or 1.3), you can get the core version of the function (ie glTexImage3D)

He’s getting a linker error, not an object building error. The compiler can’t find the function pointer…have you declared it as an extern?

i have found the problem, but thank you anyway. i declared the pointer one line before the include. a stupid mistake.