This section describes how to draw geometry with optimal primitives. Consider these guidelines to optimize drawing:
Connected primitives are desirable because they reduce the amount of data both stored and transferred, and the amount of per-polygon or per-line work done by the OpenGL. Be sure to put as many vertices as possible in a glBegin()/ glEnd() sequence to amortize the cost of a glBegin() and glEnd().
When rendering independent triangles, use glBeginGL_TRIANGLES(GL_TRIANGLES) instead of glBeginGL_POLYGON(GL_POLYGON). Also, when rendering independent quadrilaterals, use glBeginGL_QUADS(GL_QUADS).
Use a single call to glBeginGL_TRIANGLES(GL_TRIANGLES) to draw multiple independent triangles rather than calling glBeginGL_TRIANGLES(GL_TRIANGLES) multiple times. Also, use a single call to glBeginGL_QUADS(GL_QUADS) to draw multiple independent quadrilaterals, and a single call to glBeginGL_LINES(GL_LINES) to draw multiple independent line segments.
Concave and self-intersecting polygons must be tessellated by the GLU library before they can be drawn, and are therefore prohibitively expensive. Nonplanar polygons and polygons with large numbers of vertices are more likely to exhibit shading artifacts.
If your database has polygons that are not well-behaved, perform an initial one-time pass over the database to transform the troublemakers into well- behaved polygons and use the new database for rendering. You can store the results in OpenGL display lists. Using connected primitives results in additional gains.
Polygon rates can be affected directly by the number of normals or colors sent per polygon. Setting a color or normal per vertex, regardless of the glShadeModel() used, may be slower than setting only a color per polygon, because of the time spent sending the extra data and resetting the current color. The number of normals and colors per polygon also directly affects the size of a display list containing the object.
Try to send the same type of data for each vertex of a primitive. In other words, if the first vertex has an associated color or normal, the primitive can often be more efficiently processed if all the following vertices also have a color or normal.