Ticket #46218: pymol-use-glkit.diff

File pymol-use-glkit.diff, 1.3 KB (added by howarth.at.macports@…, 10 years ago)

new pymol-use-glkit.diff patch

  • layer1/Scene.cpp

    Z* ------------------------------------- 
    5757#include"ScrollBar.h"
    5858#include "ShaderMgr.h"
    5959
     60#include <GLKit/GLKMatrix4.h>
     61
    6062#ifdef _PYMOL_IP_EXTRAS
    6163#include "IncentiveCopyToClipboard.h"
    6264#endif
    void SceneRender(PyMOLGlobals * G, Picki 
    91569158    }
    91579159    if(!SettingGetGlobal_b(G, cSetting_ortho)) {
    91589160      float fov = SettingGetGlobal_f(G, cSetting_field_of_view);
    9159       gluPerspective(fov, aspRat, I->FrontSafe, I->BackSafe);
     9161      // gluPerspective(fov, aspRat, I->FrontSafe, I->BackSafe);
     9162      glMultMatrixf(GLKMatrix4MakePerspective(fov*PI/180., aspRat, I->FrontSafe, I->BackSafe).m);
    91609163    } else {
    91619164      height = fmax(R_SMALL4, -I->Pos[2]) * GetFovWidth(G) / 2.f;
    91629165      width = height * aspRat;
  • setup.py

    else: # unix style (linux, mac, ...) 
    279279        glut = posix_find_lib(['glut', 'freeglut'], lib_dirs)
    280280        pyogl_libs += ["GL", "GLU", glut]
    281281
     282    if sys.platform == 'darwin':
     283       ext_link_args += [
     284         "-framework", "GLKit",
     285        ]
     286
    282287    libs += ["GLEW"]
    283288    libs += pyogl_libs
    284289