Hello to all,
I am trying to find out how to get the function gluBuild3DMipmaps. I tried using glew but the linker says that despite is defined the function is not present. Tried also with SDL_GL_GetProcAddress and it seems that the function is not there either. I know that gluBuild3DMipmaps is included int GLU 1.3 but the question is, how do I get GLU 1.3? do I really have to grab SGI’s implementation and compile it on my own?
GLU is a GL helper utility, not a GL extension. So the function calls will not be exposed through glew. Did you link your app to the GLU library? It’s probably something like glu.dll or glu32.dll in windows.
Yes, I am linking to GLU32 (winxp sp2 VS8) infact I use gluBuild2DMipmaps (note the “2D”) all the time, but if I try to use gluBuild3DMipmaps I get the above mentioned link error.
Did anyone managed to use gluBuild3DMipmaps?
Just checked my GLU_VERSION and is “1.2.2.0 Microsoft Corporation”, so the question remains, how do we get GLU 1.3 under windows?
That’s because gluBuild3DMipmaps calls glTexImage3D and glTexImage3D is not exported from opengl32.dll
In order to use it, it is necessary to get the function pointer from the driver itself by calling
glTexImage3D = wglGetProcAddress(“glTexImage3D”);
But I have a better idea. Since we are in 2008, let the hw do the mipmapping for you.
Just stick a glTexParameteri(GL_TEXTURE_3D, GL_GENERATE_MIPMAP, TRUE) for each 3D texture you make.
Actually, yes, since GL_GENERATE_MIPMAP is there since OGL 1.4 it seems also to me reasonable enough to rely on it, especially if one expects the same application to use 3D textures.