next up previous contents
Next: Use the Depth Up: 18.4.2 Minimizing Per-Pixel Calculations Previous: Avoid Unnecessary Per-Fragment   Contents Use Simple Fill Algorithms for Large Polygons

If you are drawing very large polygons such as ``backgrounds,'' your performance will be improved if you use simple fill algorithms. For example, you should set glShadeModel() to GL_ FLAT if smooth shading is not required. Also, disable per-fragment operations such as depth buffering, if possible. If you need to texture the background polygons, consider using GL_ REPLACE for the texture environment. Keep in mind that on many architectures, a clear operation can be significantly faster than drawing large polygons.