Next | Prev | Up | Top | Contents | Index

Using Per-Fragment Operations Effectively

This section looks at some things you can do if your application is fill limited. It provides information about getting the optimum fill rates and about using pixel operations effectively.


Getting the Optimum Fill Rates

To achieve the fastest fill rates possible, consider the following:

Note: Avoid using depth buffering whenever possible, because the fill rates for depth buffering are much slower. In particular, avoid using depth-buffered lines, as they are especially slow. The depth buffer is as large as the window, so use the smallest possible window to minimize the amount of memory allocated to the depth buffer. The same applies for stencil buffers.


Using Per-Fragment Operations Effectively

Write your OpenGL program to use the combinations of pixel formats and types listed in Table 14-1, for which the hardware can use DMA. The CPU has to reformat pixels in other format and type combinations.

Pixel Formats and Types Using DMA on Low-End Systems
FormatType
GL_RGBAGL_UNSIGNED_BYTE
GL_ABGR_EXTGL_UNSIGNED_BYTE
GL_COLOR_INDEXGL_UNSIGNED_BYTE
GL_COLOR_INDEXGL_UNSIGNED_SHORT

Note that GL_ABGR_EXT provides better performance than GL_RGBA on Indigo Entry systems but not on Indy or Indigo2 XL where the two perform about the same.

Here are some additional guidelines for optimizing pixel operations:


Next | Prev | Up | Top | Contents | Index