Refacted OpenGL rendering code.

Refactored OpenGL primitives (boxes, polygons, circles, text) into
their own namespace.