You can still use it in 10.9. They're sending you a pretty strong signal that they want you to stop, though...
You can disable those warnings with the -Wno-deprecated-declarations
compiler option.
There's also some difficulties including the right headers if you're trying to use GL3 level features, because you need to include gl3.h
for that, while glut.h
includes gl.h
, which causes additional complaints about possible conflicts while building. The somewhat hacky workaround I found for this is to prevent glut.h
from including gl.h
by defining the header guard:
#include <OpenGL/gl3.h>
#define __gl_h_
#include <GLUT/glut.h>
Then, for using GL3+ level features, you need to specify that with an additional flag to glutInitDisplayMode()
:
glutInitDisplayMode(... | GLUT_3_2_CORE_PROFILE);
It looks like it's probably time to start using GLFW. I never used GLUT for anything serious, but it was always very convenient for small demos/tests.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…