Jump to content

  • Log In with Google      Sign In   
  • Create Account


GL_GENERATE_MIPMAP vs gluBuild2DMipmaps


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
4 replies to this topic

#1 Prune   Members   -  Reputation: 216

Like
0Likes
Like

Posted 21 June 2007 - 01:49 PM

Which one to use? What's the difference? gluBuild2DMipmaps(...) vs glTexParameteri(GL_TEXTURE_2D, GL_GENERATE_MIPMAP, GL_TRUE);

Sponsor:

#2 MARS_999   Members   -  Reputation: 1238

Like
0Likes
Like

Posted 21 June 2007 - 04:18 PM

GL_GENERATE_MIPMAP is useful when you have dynamic textures. But the new GenerateMipmapEXT() is better to use than GL_GENERATE_MIPMAP.

gluBuild2DMipmaps() is done with your CPU vs. GPU like above to setup your mipmap chain.

If you just want to have mipmapped textures gluBuild2DMipmaps() is just fine.

#3 Prune   Members   -  Reputation: 216

Like
0Likes
Like

Posted 21 June 2007 - 05:14 PM

I there any way to confirm that mipmapping is working when GL_GENERATE_MIPMAP is used? I get different (fail) behavior between this and gluBuild2Dmipmaps as follows:
With the gluBuild2DMipmaps function, in a program where one of the textures is with non-power-of-two dimensions (program has with alpha blending if it matters), with a Release build that texture doesn't display. With GL_GENERATE_MIPMAP it does.

#4 zedz   Members   -  Reputation: 291

Like
0Likes
Like

Posted 22 June 2007 - 10:44 AM

gluBuild2DMipmaps is very slow (+ buggy)

if a texture is not power of 2 sized then gluBuild2DMipmaps will first resize it so it is, i assume thats where the problem lies somehow.

to artifically see if mipmapping is working draw the texture with a high texture_lod_bias
perhaps draw the texture on a fullscreen sized polygon
+ then with a keypress cycle through the mipmap levels

#5 MARS_999   Members   -  Reputation: 1238

Like
0Likes
Like

Posted 22 June 2007 - 02:50 PM

If you want to use the GL_GENERATE_MIPMAP you don't use gluBuild2DMipmaps() you use glTexImage2D() and call the correct glTexParameteri() with true in it.

The above method works, and will automatically generate mipmaps for your dynamic textures for all levels above base level.

With GenerateMipmapEXT() it will generate all mipmaps above base also but when you choose to not the driver.




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS