Jump to content
  • Advertisement
Sign in to follow this  
maxest

Using only selected mipmaps from the chain

This topic is 3298 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I want to use only selected mipmaps. More specifically, I want to use only 2 first mips from the chain. So I thought about quite obvious solution - generating only 2 mipmaps. But *how* to do that? gluBuild2DMipmaps always generate a full chain, the same as GL_GENERATE_MIPMAP flag. So the only solution is to manually call glTexImage and manually rescaling every texture to fit mipmap size? Any better ideas?

Share this post


Link to post
Share on other sites
Advertisement
Got it.
I use glTexImage2D + glTexParameteri(GL_GENERATE_MIPMAP -> true) and I used GL_TEXTURE_BASE_LEVEL and GL_TEXTURE_MAX_LEVEL to control levels of loaded mipmaps. Works nice

Share this post


Link to post
Share on other sites
For future coding goodness you may want to consider glGenerateMipmap in place of the deprecated (and removed in 3.2) texture parameter...

Share this post


Link to post
Share on other sites
If *they finally implement that function correctly, why not? ;)

*
NVidia, on GF8400 and GF6600 mipmaps are not regenerated when going to full-screen from minimized mode (I mean when OGL loses it's "device") and it has to be done manually. Quite annoying since anything else doesnt need to be recreated.
ATI - afair it simply doesn't work as it should. Maybe current drivers work well now.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!