Fix OpenGL warnings on MacOS