following a tutorial as is in http://en.wikibooks.org/wiki/OpenGL_Programming/