Next: 16.4.4 Clearing the Color
Up: 16.4 Tuning the Raster
Previous: Use the Depth Buffer
Follow these guidelines when rendering textured objects:
- Avoid frequent switching between texture maps. If you have many small textures,
consider combining them into a single larger, tiled texture. Rather than switching to
a new texture before drawing a textured polygon choose texture coordinates that select
the appropriate small texture tile within the large texture.
- Use texture objects to encapsulate texture data. Place all the
glTexImage\*() calls (including mipmaps) required to completely specify a
texture and the associated glTexParameter\*() calls (which set texture
properties) into a texture object and bind this texture object to the rendering
context. This allows the implementation to compile the texture into a format that
is optimal for rendering and, if the system accelerates texturing, to efficiently
manage textures on the graphics adapter.
- If possible, use glTexSubImage\*D() to replace all or part of an existing
texture image rather than the more costly operations of deleting and creating an entire
new image.
- Call glAreTexturesResident() to make sure that all your textures are
resident during rendering. (On systems where texturing is done on the host,
glAreTexturesResident() always returns GL_TRUE.) If necessary, reduce
the size or internal format resolution of your textures until they all fit into
memory. If such a reduction creates intolerably fuzzy textured objects, you may give
some textures lower priority.
- Avoid expensive texture filter modes. On some systems, trilinear filtering is
much more expensive than point sampling or bilinear filtering.
David Blythe
Thu Jul 17 21:24:28 PDT 1997