State Change - HP b2600 Supplementary Manual

Opengl implementation guide
Hide thumbs Also See for b2600:
Table of Contents

Advertisement

Chapter 5

state change

OpenGL state setting commands can be classified into two different
categories. The first category is vertex-data commands. These are the
calls that can occur between a glBegin/glEnd pair:
glVertex
glColor
glIndex
glNormal
glEdgeFlag
glMaterial
glTexCoord
The processing of these calls is very fast. Restructuring a program to
eliminate some vertex data commands will not significantly improve
performance.
The second category is modal state-setting commands, or sometimes
referred to as "mode changes." These are the commands that:
Turn on/off capabilities,
Change attribute settings for capabilities,
Define lights,
Change matrices,
etc.
These calls cannot occur between a glBegin/glEnd pair. Examples of
such commands are:
glEnable(GL_LIGHTING);
glFogf(GL_FOG_MODE, GL_LINEAR);
glLightf(..);
glLoadMatrixf(..);
Changes to the modal state are significantly more expensive to process
than simple vertex-data commands. Also, application performance can be
optimized by grouping modal-state changes, and by minimizing the
number of modal-state changes:
programming hints
OpenGL performance hints
57

Advertisement

Table of Contents
loading

Table of Contents