try moving order of functions to see if OpenGL direct mode works