Next: 16.5.3 Using Display Lists
Up: 16.5 Rendering Geometry Efficiently
Previous: Using Peak-Performance Primitives
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 are reused.
- 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.
David Blythe
Thu Jul 17 21:24:28 PDT 1997