The following warning appears when building pymol 1.7.4.0 on OS X 10.10
layer1/Scene.cpp:9159:7: warning: 'gluPerspective' is deprecated: first deprecated in OS X 10.9 - "Use GLKMatrix4MakePerspective" [-Wdeprecated-declarations] gluPerspective(fov, aspRat, I->FrontSafe, I->BackSafe); ^ /System/Library/Frameworks/OpenGL.framework/Headers/glu.h:278:13: note: 'gluPerspective' has been explicitly marked deprecated here extern void gluPerspective (GLdouble fovy, GLdouble aspect, GLdouble zNear, GLdouble zFar) OPENGL_DEPRECATED_MSG(10_0, 10_9, "Use GLKMatrix4MakePerspective"); ^
This should be fixed with the change...
--- pymol-1.7.4.0/layer1/Scene.cpp.orig 2014-12-11 12:48:50.000000000 -0500 +++ pymol-1.7.4.0/layer1/Scene.cpp 2014-12-11 13:30:54.000000000 -0500 @@ -57,6 +57,8 @@ #include"ScrollBar.h" #include "ShaderMgr.h" +#include <GLKit/GLKMatrix4.h> + #ifdef _PYMOL_IP_EXTRAS #include "IncentiveCopyToClipboard.h" #endif @@ -9156,7 +9158,8 @@ } if(!SettingGetGlobal_b(G, cSetting_ortho)) { float fov = SettingGetGlobal_f(G, cSetting_field_of_view); - gluPerspective(fov, aspRat, I->FrontSafe, I->BackSafe); + // gluPerspective(fov, aspRat, I->FrontSafe, I->BackSafe); + glMultMatrixf(GLKMatrix4MakePerspective(fov, aspRat, I->FrontSafe, I->BackSafe).m); } else { height = fmax(R_SMALL4, -I->Pos[2]) * GetFovWidth(G) / 2.f; width = height * aspRat; --- pymol-1.7.4.0/setup.py.orig 2014-12-11 13:59:08.000000000 -0500 +++ pymol-1.7.4.0/setup.py 2014-12-11 14:02:20.000000000 -0500 @@ -279,6 +279,11 @@ glut = posix_find_lib(['glut', 'freeglut'], lib_dirs) pyogl_libs += ["GL", "GLU", glut] + if sys.platform == 'darwin': + ext_link_args += [ + "-framework", "GLKit", + ] + libs += ["GLEW"] libs += pyogl_libs
but the resulting build produces rendering that is about 10 times too smaller in the Pymol window when running the demos. Any idea what is missing here?
fov is degrees, not radians, so you should use (fov * PI / 180.).
This is not a bug. Yes it's deprecated, but it's cross platform (unlike GLKit) and nothing is broken, so giving this low priority for now.
Thank. Scaling fov solved the rendering issue. The other depreciated call...
layer0/os_gl.cpp:99:59: warning: 'gluErrorString' is deprecated: first deprecated in OS X 10.9 [-Wdeprecated-declarations]
printf("OpenGL-Error: Where? %s: %s\n", pos, (char *) gluErrorString(glerr));
^
/System/Library/Frameworks/OpenGL.framework/Headers/glu.h:260:24: note: 'gluErrorString' has been explicitly marked deprecated here
extern const GLubyte * gluErrorString (GLenum error) OPENGL_DEPRECATED(10_0, 10_9);
doesn't appear to have a replacement function available.
For the record:
GLU dependency removed in svn rev 4187