Fix compilation errors on linux/gcc

OpenGL output currently not working correctly on linux