Next: 18.5.3 Using Display Lists
Up: 18.5 Rendering Geometry Efficiently
Previous: 18.5.1 Using Peak-Performance Primitives
  Contents
Vertex arrays are available in OpenGL 1.1. They offer the following benefits:
- The OpenGL implementation can take advantage of uniform data formats.
- The glInterleavedArrays() call lets you specify packed vertex data
easily. Packed vertex formats are typically faster for OpenGL to process.
- The glDrawArrays() call reduces subroutine call overhead.
- The glDrawElements() call reduces subroutine call overhead and
also reduces per-vertex calculations because vertices may be reused.
Be aware that using indexed vertices may introduce other problems with cache
misses if the access pattern corresponding to the indexes is irregular
enough. Indexed arrays are often most useful with implementations which
perform the vertex processing on the CPU and may tend to degrade the
performance of systems which have fast geometry processing in the
accelerator if they become bottlenecked by the memory subsystem.
- Use the EXT_compiled_vertex_array extension if it is available.
This extension allows you to lock down the portions of the arrays that you are
using. This way the OpenGL implementation can DMA the arrays to the graphics
adapter or reuse per-vertex calculations for vertices that are shared by
adjacent primitives.
If you use glBegin() and glEnd() instead of glDrawArrays()
or glDrawElements() calls, put as many vertices as possible between
the glBegin() and the glEnd() calls.
Next: 18.5.3 Using Display Lists
Up: 18.5 Rendering Geometry Efficiently
Previous: 18.5.1 Using Peak-Performance Primitives
  Contents
2001-01-10