Wednesday, 27 April 2011

OpenGL States

On/off (e.g., depth buffer test)
  1. glEnable( GLenum )
  2. glDisable( GLenum )
  3. Examples:
  4. glEnable(GL_DEPTH_TEST);
  5. glDisable(GL_LIGHTING);
Mode States
  1. Once the mode is set the effect stays until reset
     Examples:
    glShadeModel(GL_FLAT) or glShadeModel(GL_SMOOTH)
    glLightModel(…) etc.

No comments:

Post a Comment