Procedural mapping on a sphere...

Hi. I have the OpenGL Superbible and wanted to see how procedural mapping of a sphere looks. I’ve adapted the .vs and .fs files (as for the diagram on p.593) for my own needs, but don’t know how to actually code the sphere using c++ (with arrow control over orientation and reflective effect).

Can someone help?


Google up GLUT.