From Ohm

OpenGL State

The OpenGL rendering state and thus the state of the graphics hardware is defined by commands starting with “gl” as defined by the OpenGL headers:

#ifndef __APPLE__
#include <GL/gl.h>
#include <GL/glu.h>
#else
#include <OpenGL/gl.h>
#include <OpenGL/glu.h>
#endif

For example to change the actual rendering color to red:

glColor3f(1.0f,0.0f,0.0f);

Same holds for texturing (glTexCoord2f), normals (glNormal3f) and other graphic attributes related to shading, fogging etc.

Read more about it in the OpenGL Red Book [1] and the OpenGL tutorial.

Links

  1. schorsch.efi.fh-nuernberg.de:8080/red-book

Retrieved from http://schorsch.efi.fh-nuernberg.de/roettger/index.php/MedicalVisualization/OpenGLState

Page last modified on October 26, 2013, at 09:05 PM