Jump to content

  • Log In with Google      Sign In   
  • Create Account

We're offering banner ads on our site from just $5!

1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


#Actualmhagain

Posted 14 February 2013 - 08:02 PM

Here's your problem:

 

    glMatrixMode( GL_PROJECTION );
    glOrthof( 0, 320, 0, 480, -1, 1);

 

glOrtho doesn't load the generated ortho matrix onto the stack; what it does is take the current matrix and multiplies it by the generated ortho matrix (http://www.khronos.org/opengles/sdk/1.1/docs/man/).  So instead you do:

 

    glMatrixMode( GL_PROJECTION );
    glLoadIdentity ()
    glOrthof( 0, 320, 0, 480, -1, 1);

 

And it works!


#1mhagain

Posted 14 February 2013 - 08:02 PM

Here's your problem:

    glMatrixMode( GL_PROJECTION );
    glOrthof( 0, 320, 0, 480, -1, 1);

glOrtho doesn't load the generated ortho matrix onto the stack; what it does is take the current matrix and multiplies it by the generated ortho matrix (http://www.khronos.org/opengles/sdk/1.1/docs/man/).  So instead you do:

    glMatrixMode( GL_PROJECTION );
    glLoadIdentity ()
    glOrthof( 0, 320, 0, 480, -1, 1);

And it works!


PARTNERS