I'm writing an Android app that is basically 2D, what i need is to have a scene with simple coordinates to emulate something like the Android Canvas, so 0,0 is top left and w/h are bottom right. Up to now i have been able to create the scene and draw to it, everything works properly, translate moves the objects correctly according to w/h coordinates in my 2D plane.

Problem is that now i want to "flip" a texture using X axis rotation and i want a 3D effect while flipping (like a card flip), if i use the "rotatef" call the flip occurs but its flat, so there is no perspective at all, is just like scaling the height till it goes to zero so there is no distance perception. I understand that this is caused by the ortho call and i need to use GLU setPerspective, however, no matter what i try with GLU i cannot obtain the same result (so a viewport where 0,0 is top left and w/h bottom right and fills the screen).

I currently create the ViewPort in this way:

Code :
gl.glViewport(0, 0, w, h);
gl.glMatrixMode(GL_PROJECTION);
gl.glLoadIdentity();
gl.glOrthof(0, w, h, 0, -1f, 100f);
gl.glEnable(GL_TEXTURE_2D);

This will create my desired viewport with 0/0 at top left and w/h at bottom right filling the screen. Then i load my texture from a Bitmap.

Code :
gl.glBindTexture(GL10.GL_TEXTURE_2D, id);
gl.glTexParameterf(GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_MIN_FILTER, GL10.GL_NEAREST);
gl.glTexParameterf(GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_MAG_FILTER, GL10.GL_LINEAR);
GLUtils.texImage2D(GL10.GL_TEXTURE_2D, 0, bitmap, 0);

And finally i draw the texture:

Code :
gl.glMatrixMode(GL_MODELVIEW);
gl.glLoadIdentity();
gl.glPushMatrix();
// Translate to starting position first in 0,0,w,h coordinates
gl.glTranslatef(mXOffset, mYOffset, 0f);
// Rotate 45 degrees on X axis
gl.glRotatef(45, 1.0f, 0.0f, 0.0f)
// Draw
gl.glEnableClientState(GL_VERTEX_ARRAY);
gl.glEnable(GL10.GL_TEXTURE_2D);
gl.glVertexPointer(2, GL_FLOAT, 0, sVertexBuffer);
gl.glEnableClientState(GL_TEXTURE_COORD_ARRAY);
gl.glBindTexture(GL10.GL_TEXTURE_2D, id);
gl.glTexCoordPointer(2, GL_FLOAT, 0, mTextureBuffer);
gl.glDrawArrays(GL_TRIANGLE_STRIP, 0, 4);
gl.glDisableClientState(GL_VERTEX_ARRAY);
gl.glDisableClientState(GL_TEXTURE_COORD_ARRAY);
gl.glPopMatrix();

Finally my vertex buffers are:

Code :
float vertices[] = {
        0f, 0f,  // 0, Top Left
        0f, 1f,  // 1, Bottom Left
        1f, 0f,  // 3, Top Right
        1f, 1f,  // 2, Bottom Right
};
float texturePoints[] = {
        0f, 0f,
        0f, v,
        u, 0,
        u, v,
};

Thanks anyone for help!