Re: [android-developers] [OpenGL ES] 2D controls over 3D world

2010-06-21 Thread Leigh McRae
I myself wouldn't do this every frame. I would have both the 3D and 2D projection matrices cached someplace and bang it in with glLoadMatrix each frame. You likely are using these for culling and other stuff anyways. I wouldn't bother with push/pop but in reality it's likely a very small

[android-developers] [OpenGL ES] 2D controls over 3D world

2010-06-20 Thread Simone
Hi, I created a 3D world, and I managed to draw 2D overlay controls (as in a game) over it. I did it with this: public void onDrawFrame(GL10 gl) { //some 3d draws and transformations here gl.glMatrixMode(GL10.GL_PROJECTION); gl.glPushMatrix();