OpenGL orientation on iPad
(Nov 8, 2010 01:50 PM)ThemsAllTook Wrote: They actually don't. Both perform a no-op on the current matrix and leave it in precisely the state it was in before they were executed. Any effect they appear to have is coming from something else in your code, such as a call to glLoadIdentity().
You're absolutely right, thanks for your explanations.
To go to landscape I use this :
glViewport(0, 0, backingWidth, backingHeight);
glOrthof(0.0f, backingWidth, 0.0f, backingHeight, -1.0f, 1.0f);
glTranslatef(0.0f, backingHeight, 0.0f);
glRotatef(270.0f, 0.0f, 0.0f, 1.0f);
to go back to portrait is the same with zeros
Now I understand that the translate and rotate don't do anything with zeros as parameters, and I will correct that.
My first game on AppStore : here
|Messages In This Thread|
RE: OpenGL orientation on iPad - Fred9000 - Nov 8, 2010 02:56 PM
Possibly Related Threads...
|SDL1.3/OpenGLES and iPhone Orientation||SparkyNZ||10||8,892||
Apr 13, 2011 02:38 AM
Last Post: SparkyNZ
Dec 30, 2010 04:43 PM
Last Post: reubert