I want to use 3dTexture in vc6 and My system is XP.
But I can not find any 3dTexture function available in my programming enviroment.
the Version of opengl is 1.4
please help me with this problem
thanks
Hi, in openGL some of the functionality is contained in extensions. The most recent driver for your graphics card has these extensions (depending on the card) but the coding platform is unaware of them. So to use a particular extension you need to look it up in the extension registry
then when you know what its called, you can check to see if your card supports it.
glGetString(GL_EXTENSIONS)
will return a string of all available extensions for your card. you need to call this after setting up the windowing etc.
once you know that your card supports a particular extension, you obtain function pointers to that extensions functions. for 3D texture. you need a up to date glext.h in your include path (usually GL/glext.h) this can be obtained from graphics card driver websites usually
the function pointer decs
PFNGLTEXIMAGE3DPROC pglTexImage3D = NULL;
PFNGLACTIVETEXTUREARBPROC pglActiveTextureARB = NULL;
the getting of function addresses
pglTexImage3D = (PFNGLTEXIMAGE3DPROC) wglGetProcAddress("glTexImage3D");
pglActiveTextureARB = (PFNGLACTIVETEXTUREARBPROC) wglGetProcAddress("glActiveTextureARB");
after this, you use the functions as normal, and the glext.h has all the new constants etc that you need, hope this helps
Thank you very much friends!
This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.