View Full Version : please help me with 3dtexture
05-26-2004, 06:45 PM
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
05-27-2004, 08:29 AM
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
Extension Registry (http://oss.sgi.com/projects/ogl-sample/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
05-28-2004, 11:36 PM
Thank you very much friends!
Powered by vBulletin® Version 4.2.3 Copyright © 2017 vBulletin Solutions, Inc. All rights reserved.