Messed with opengl code to try and get mac working.