Fixed opengl api bug, now compiles in msvc.