how to get gluBuild3DMipmaps

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 “ Microsoft Corporation”, so the question remains, how do we get GLU 1.3 under windows?


Mh, so it seems that one has to compile his own version from SGI, is this the “official” way to do?

On the very same page there is an interesting line:

“Also, gluBuild3DMipmaps and gluBuild3DMipmapLevels has been fixed so that it gets the addresses it needs using wglGetProcAddress”

sounds stragne to me too though…

Don’t know what the official way is, I’m using linux (ubuntu) an it apparently I already have glu version 1.3.

PS. The mesa gl implementation also has glu code. Don’t know if it’s 1.3 though.

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.

You mean the driver, right? I thought the construction of the mipmap chain is still not hardware-accelerated.

glGenerateMipmapEXT is often hardware accelerated.

Hardware accelerated mip-map construction was there for years. Actually, any card that can render to texture should be able to do it.

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.