Why can not find glTexImage3D

My card is geforece 6800 and it supports opengl1.5,but When I useglTexImage3D ,errors always are:
error C2065: ‘glTexImage3D’ : undeclared identifier,

can someone tell me why and how can i do?
I install the drive for my card already and I include the head files too,
when use :
PFNGLTEXIMAGE3DPROC pglTexImage3D= (PFNGLTEXIMAGE3DPROC) wglGetProcAddress(“glTexImage3D”);
it runs nicely ,why?

Hello Hichill,

I believe the second to the last question on this page [1] and the explanation of OpenGL Extensions on this page [2] contain the information you are looking for.

The long and the short of it is:
Windows Supports OpenGL 1.1
The function you want to use is included in an OpenGL version higher than 1.1
Assuming your graphics card supports the version of OpenGL the function you want is included in, you can retrieve a function pointer to it via wglGetProcAddress

In addition to the OpenGL Extension Loading Libraries suggested in [1] I recommend GLee [3]

Hope that helps :slight_smile:

EDIT: Added recommendation for GLee

Thanks!

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.