~unity-team/nux/xenial

« back to all changes in this revision

Viewing changes to NuxGraphics/GraphicsEngine.cpp

  • Committer: CI Train Bot
  • Author(s): Eleni Maria Stea
  • Date: 2015-04-10 21:56:48 UTC
  • mfrom: (856.1.2 nux)
  • Revision ID: ci-train-bot@canonical.com-20150410215648-g78cmjh0z24jlm5h
glFrustrum should be performed in projection mode, otherwise the modelview matrix has projection elements and the lighting and 3d clipping planes of unity and other compiz plugins that load this modelview matrix are buggy.
Approved by: Stephen M. Webb, PS Jenkins bot

Show diffs side-by-side

added added

removed removed

Lines of Context:
830
830
#ifndef NUX_OPENGLES_20
831
831
    CHECKGL(glMatrixMode(GL_PROJECTION));
832
832
    CHECKGL(glLoadIdentity());
833
 
    CHECKGL(glMatrixMode(GL_MODELVIEW));
834
 
    CHECKGL(glLoadIdentity());
835
833
    CHECKGL(glFrustum(
836
834
                -1.0,     // left
837
835
                1.0,      // right
840
838
                0.1,    // near,
841
839
                2000.0  // far
842
840
              ));
 
841
    CHECKGL(glMatrixMode(GL_MODELVIEW));
 
842
    CHECKGL(glLoadIdentity());
843
843
#endif
844
844
  }
845
845