Unable to resolve an expected primary expression error

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • rahul sinha
    New Member
    • Jan 2011
    • 17

    Unable to resolve an expected primary expression error

    Code:
    void myglOrtho(GLfloat left,GLfloat right,GLfloat bottom,GLfloat top,GLfloat far,GLfloat near)
    {
            GLfloat a,b,c,d,e,f;
            
              a=left-right; 
              b=left+right; 
              c=bottom-top;
              d=bottom+top; 
              e=far-near;
              f=far+near;
              
              
              
         
         GLfloat m[] = { (2.0f/-a), 0.0f, 0.0f, 0.0f,
                         0.0f, (2.0f/-c), 0.0f, 0.0f,
                         0.0f, 0.0f, (-2.0f/e), 0.0f,
                         (b/a), (d/c), (-f/e), 1.0f
                       };
        	glMatrixMode(GL_PROJECTION);
        	glLoadIdentity();
            glLoadMatrixf(m);
    }
    Last edited by Rabbit; Oct 8 '12, 03:18 PM. Reason: Please use code tags when posting code.
  • weaknessforcats
    Recognized Expert Expert
    • Mar 2007
    • 9214

    #2
    There is no error in the code you have posted. It compiles OK using Visual Studio.NET 2008.

    Comment

    Working...