gluBuild2DMipmaps vs. Loading your own mipmaps

Started by
3 comments, last by GOCP 18 years, 3 months ago
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
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.
I have one question. Does anyone have numbers what is memory increase when building mipmaps gluBuild2DMipmaps() vs glTexImage2D()?
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.
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

This topic is closed to new replies.

Advertisement