LWJGL
May 25, 2013, 16:52:47 *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: LWJGL 2.9.0 released!
 
   Home   Help Search Login Register  



Pages: [1]
  Print  
Author Topic: gluBuild3DMipmaps  (Read 672 times)
rp
Newbie
*
Posts: 3


« on: July 10, 2012, 08:44:50 »

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
Logged
Fool Running
Nerdus Imperius
*****
Posts: 742


« Reply #1 on: July 10, 2012, 10:02:58 »

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).
Logged

Programmers will, one day, rule the world... and the world won't notice until its too late.Just testing the marquee option Grin
rp
Newbie
*
Posts: 3


« Reply #2 on: July 10, 2012, 13:34:42 »

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

Regards.
rp
Logged
mattdesl
Newbie
*
Posts: 26


« Reply #3 on: July 11, 2012, 05:06:17 »

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
Logged
rp
Newbie
*
Posts: 3


« Reply #4 on: July 11, 2012, 06:17:20 »

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

Thanks.
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines
SMFAds for Free Forums
Valid XHTML 1.0! Valid CSS!