translated from console to windows form from the tutorial website http://www.opengl-tutorial.org/