OpenGL is a
state
machine. - It has an inherent state represented by
internal variables
- Variables initially are in their default
state
- Variables changed through OpenGL calls
The advantage of this implementation is that
fewer arguments are passed to OpenGL on each function call
A
common source of programming errors results from the programmer
misunderstanding or making incorrect assumptions about the OpenGL state
To
enable a
state variable, one can call
glEnable(GLenum
capability);To
disable
the capability, one calls
glDisable(GLenum
capability);One
can
test if a
state variable is enabled with
glIsEnabled(GLenum
capability);