gluBuild3DMipmaps

Started by rp, July 10, 2012, 15:44:50

Previous topic - Next topic

rp

Hello all,

I was looking for gluBuild3DMipmaps in the class GLU, but I can't find it. Is there another way to access this method?

Regards,
rp

Fool Running

Someone can correct me if I'm wrong, but it looks like LWJGL only supports GLU version 1.2 (gluBuild3DMipmaps is in version 1.3).
Programmers will, one day, rule the world... and the world won't notice until its too late.Just testing the marquee option ;D

rp

Must be something like that. If anyone else has this question, it can be done, since openGL 1.4. You must call
glTexParameteri(GL_TEXTURE_3D, GL_GENERATE_MIPMAP, GL_TRUE);

before
glTexImage3D(...)


Regards.
rp

mattdesl

You should use glGenerateMipmap instead, and only fall back to GL_GENERATE_MIPMAP if necessary.

http://www.opengl.org/wiki/Common_Mistakes#gluBuild2DMipmaps
http://www.g-truc.net/post-0256.html

Here's what I do:
- If GL30 is supported, use GL30.glGenerateMipmap()
- Otherwise, if GL_EXT_framebuffer_object is present, use EXTFramebufferObject.glGenerateMipmapEXT()
- Otherwise, fall back to GL_GENERATE_MIPMAP

rp

Thanks for this Update. I just found the solution somewhere in the web. But yours seems to be better.

Thanks.