VolumeRendering
OpenGL State
← OpenGL Terminology | ● | OpenGL Graphic Primitives →
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
#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 and the OpenGL tutorial.