===================================================================
--- layer0/os_gl.cpp (revision 4111)
+++ layer0/os_gl.cpp (working copy)
+const char* PyMOLgluErrorString(GLenum errorCode)
+ {GL_NO_ERROR, "no error"},
+ {GL_INVALID_ENUM, "invalid enumerant"},
+ {GL_INVALID_VALUE, "invalid value"},
+ {GL_INVALID_OPERATION, "invalid operation"},
+ {GL_STACK_OVERFLOW, "stack overflow"},
+ {GL_STACK_UNDERFLOW, "stack underflow"},
+ {GL_OUT_OF_MEMORY, "out of memory"},
+ {GLU_INVALID_ENUM, "invalid enumerant"},
+ {GLU_INVALID_VALUE, "invalid value"},
+ {GLU_OUT_OF_MEMORY, "out of memory"},
+ {GLU_INCOMPATIBLE_GL_VERSION, "incompatible gl version"},
+ {GLU_INVALID_OPERATION, "invalid operation"},
+ for (i=0; errors[i].string; i++)
+ if (errors[i].code == errorCode)
+ return errors[i].string;
void PyMOLReadPixels(GLint x,
@@ -96,7 +133,7 @@ int PyMOLCheckOpenGLErr(const char *pos)
GLenum glerr = glGetError();
while(glerr != GL_NO_ERROR) {
- printf("OpenGL-Error: Where? %s: %s\n", pos, (char *) gluErrorString(glerr));
+ printf("OpenGL-Error: Where? %s: %s\n", pos, (char *) PyMOLgluErrorString(glerr));
===================================================================
--- layer0/os_gl.h (revision 4111)
+++ layer0/os_gl.h (working copy)
/* END PROPRIETARY CODE SEGMENT */
+static const char* PyMOLgluErrorString(GLenum errorCode);
void PyMOLReadPixels(GLint x,
===================================================================
--- layer1/Scene.cpp (revision 4111)
+++ layer1/Scene.cpp (working copy)
@@ -60,6 +60,8 @@ Z* -------------------------------------
+#include <GLKit/GLKMatrix4.h>
#include "IncentiveCopyToClipboard.h"
@@ -9072,7 +9074,8 @@ void SceneRender(PyMOLGlobals * G, Picki
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*PI/180., aspRat, I->FrontSafe, I->BackSafe).m);