Hi there!
After sending my first game to Apple (in review at this time!) it's time to begin with the second one! For this one I need to set OpenGL ES in landscape mode. I've started doing some game tests in a project in portrait mode but when I try to port this to landscape nothing work as it used to...
I know how to set landscape mode in the .plist file and also how to set OpenGL to draw in landscape mode:
Code:
glOrthof( -rect.size.width / 2, rect.size.width / 2, -rect.size.height / 2, rect.size.height / 2, -1, 1 );
(...)
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
glTranslatef(160.0f, 240.0f, 0.0f );
glRotatef(-90.0, 0.0, 0.0, 1.0);
glScalef(1.0, -1.0, 1.0);
Objects are now drawn in landscape mode as it was expected, but nothing's changed with this, so there's no axis inversion and objects didn't even seem to be where they're drawn (so for touching an object I must touch the screen zone where it used to be in portrait mode)... Is there any way of setting OpenGL in a landscape context and setting all with this (so no need to turn head to image how axis are going or where the object is, instead it's printed in other point? I'm getting quite mad with this... U_U'
Thanks in advance!