I am using an Ortho projection to do most of my stuff and i am happy with it, now however i need to create a simple "flip card" effect on an object similar to what View.rotateX does in Android views.
I know this is not possible in real 3D without switching to GLU perspective however i was wondering if it would be possible to "fake" this by creating a sort of trapezoidal scaling of the Quad before drawing, even an imperfect result would be fine. I DO NOT want to use a perspective projection.
This is my projection
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);
And this is my texture drawing call
gl.glTranslatef(mXOffset, mYOffset, 0f);
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);
I assume Android View implementation if using hardware acceleration is actually doing a similar thing but i cannot find the implementation details.