• Advertisement
Sign in to follow this  

gluBuild2DMipmaps vs. Loading your own mipmaps

This topic is 4437 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 just got done loading my own mipmaps and decided that there wasn't any IQ difference between the two. So if that is the case what is the advantage to load each level yourself? Thanks

Share this post


Link to post
Share on other sites
Advertisement
gluBuild2DMipmaps uses a simple box-filter to resize each mipmap level, however there might be times when you need a more complex filter.

Also, images formats such a DDS arent supported by gluBuild2DMipmaps and come with a complete set of mipmaps for the image.

Share this post


Link to post
Share on other sites
I have one question. Does anyone have numbers what is memory increase when building mipmaps gluBuild2DMipmaps() vs glTexImage2D()?

Share this post


Link to post
Share on other sites
Since each mipmap level takes up 1/4 the size of the previous level, all mipmaps added together take up only half the size of the original image. So if your image, without mipmaps, takes up 1024 bytes, then with the mipmaps it will take 1536 bytes.

Share this post


Link to post
Share on other sites
I belive it's a 4/3 increase, not a 50%, thus 1024 bytes would become 1365 bytes.

size = 1/4 + 1/16 + 1/64 +..... +(1 / (4^n))... as n->infitily, size->1/3

Though I'm still half asleep so my maths might be off.

GOCP

Share this post


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

  • Advertisement