Messed up Mipmaps

Hi! I have a new problem every week it seems. :mad: This week it’s mipmaps. Actually, it’s just textures in general. Whenever I set the minification filter to LINEAR_MIPMAP_LINEAR or any other mipmap filter and then set my mipmap levels with gluBuild2DMipmaps or just the regular glTexImage2D scheme, my mipmaps turn out very, very blurry. Then, if I choose LINEAR or NEAREST, the image starts swimming. Neither looks very nice. How do I fix it? :confused:

Maybe build the mipmaps by hand and then load them yourself? It’s a little bit hard but if everything else fails…

try this:

glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);

glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_NEAREST);

btw, mipmaps will make your textures a little blurry looking from a distance.

In fact, LINEAR_MIPMAP_LINEAR should look the best, really.

  1. If you use gluBuild2DMipmaps be sure to send power of two textures, else it will resample them.

  2. The choice of the mipmap levels used (without tweaking with GL texture lod parameters) are dependant on the hardware, driver, and driver settings. Using lower detail mipmaps is frequently done by ‘cheating drivers’ too.
    With the nvidia control panel, you can choose ‘best quality’ setting to ensure mipmaps levels used are the most detailed ones.

Hope it helps.