next up previous contents
Next: 6.13 Texture Coordinate Generation Up: 6 Texture Mapping Previous: 6.11 Rendering Text   Contents

6.12 Texture Mosaicing

The method described above for grouping several images together in a single texture turns out to be useful in other applications as well. In some OpenGL implementations the cost of binding a texture object can limit the overall performance of the application when a large number of textures are being used in each frame. The situation can be mitigated to some extent by packing textures which are used in the same scene together in a single object to reduce the number of texture binds. Also, some images may not need a full power of two for their width or height leaving an opportunity to use texture memory more efficiently if multiple images can be packed together.

Geometry which uses an image within a mosaiced texture has its texture coordinates scaled and biased to index only the texels corresponding to its image. As in the case of character rendering, the individual images in the mosaic must be separated far enough apart so that they do not interfere during filtering. Careful attention should be paid to mipmap generation to ensure that multiple images are not blurred together in a level. The texture LOD clamping capability in OpenGL 1.2 can be used to restrict the range of coarse LODs which are used or mosaiced textures may be constructed from similar enough images that an appropriate single image can be constructed for each level of detail. It may also be useful to pack images together which use the same texture environments to reduce the number of texture environment changes as well.


next up previous contents
Next: 6.13 Texture Coordinate Generation Up: 6 Texture Mapping Previous: 6.11 Rendering Text   Contents
2001-01-10