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);
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
glOrthof(0.0f, backingWidth, 0.0f, backingHeight, -1.0f, 1.0f);
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
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 |
|
OpenGL orientation on iPad - Fred9000 - Nov 8, 2010, 10:19 AM
RE: OpenGL orientation on iPad - ThemsAllTook - Nov 8, 2010, 12:25 PM
RE: OpenGL orientation on iPad - Fred9000 - Nov 8, 2010, 12:54 PM
RE: OpenGL orientation on iPad - ThemsAllTook - Nov 8, 2010, 01:50 PM
RE: OpenGL orientation on iPad - Fred9000 - Nov 8, 2010 02:56 PM
RE: OpenGL orientation on iPad - Fred9000 - Nov 9, 2010, 06:15 AM
RE: OpenGL orientation on iPad - ThemsAllTook - Nov 9, 2010, 09:18 AM
RE: OpenGL orientation on iPad - Fred9000 - Nov 27, 2010, 01:21 AM
|
Possibly Related Threads...
| Thread: | Author | Replies: | Views: | Last Post | |
| SDL1.3/OpenGLES and iPhone Orientation | SparkyNZ | 10 | 8,892 |
Apr 13, 2011 02:38 AM Last Post: SparkyNZ |
|
| Orientation/rotation events | shyguy | 1 | 3,967 |
Dec 30, 2010 04:43 PM Last Post: reubert |
|

