next up previous contents
Next: 6.1.5 Texture Environment Up: 6.1.4 Filtering Previous: 6.1.4 Filtering

6.1.4.1 Additional Control of Texture Level of Detail

In OpenGL 1.0 and 1.1, all the mipmap levels of a texture must be specified and consistent. To be consistent, every mipmap level of a texture must be half the dimensions (until reaching a dimension of one and excluding border texels) of the previous mipmap LOD, and all the mipmaps must shared the same internal format and borders.

If mipmap filtering is requested for a texture, but all the mipmap levels of a texture are not present or not consistent, OpenGL silently disables texturing. A common pitfall for OpenGL programmers is supplying an inconsistent or incomplete set of mipmap levels and then wondering why texturing does not work. Be sure to specify all the mipmap levels of a texture consistently. If you use the GLU routines for building mipmaps, this is guaranteed.

OpenGL 1.2 relaxes the texture consistency requirement by allowing the application to specify a contiguous range of mipmap levels that must be consistent. This permits an application to still use mipmapping if only the 1x1 through 256x256 mipmap levels of a texture with a 1024x1024 level 0 texture, but not supply the 512x512 and 1024x1024 levels by managing the texture's GL_TEXTURE_BASE_LEVEL and GL_TEXTURE_MAX_LEVEL parameters. If an application is designed to guarantee a constant frame-rate, one reason the application might constrain the base and maximum LODs in this way is that the application does not have the time to read the 512x512 and 1024x1024 mipmap levels from disk. In this case, the application makes the choice to settle for lower resolution LODs, possibly resulting in blurry textured surfaces, rather than of dropping a frame. Hopefully on subsequent frames, the application can manage to load the full set of mipmap levels for the texture and continue with full texture quality. The OpenGL implementation implements this feature by simply clamping the $\lambda$ LOD value to the range of available mipmap levels.

Additionally, even when all the mipmap levels are present and consistent, some of the texture images for some levels may be out-of-date if the texture is being dynamically updated using subtexture loads. OpenGL 1.2's GL_TEXTURE_MIN_LOD and GL_TEXTURE_MAX_LOD texture parameters provide a further means to clamp the $\lambda$ LOD value to a contiguous range of mipmap levels.4 Section 6.8 applies this functionality to the task of texture paging.


next up previous contents
Next: 6.1.5 Texture Environment Up: 6.1.4 Filtering Previous: 6.1.4 Filtering
David Blythe
1999-08-06