Old OpenGL utility code that I found useful.