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();
gl.glLoadIdentity();
GLU.gluOrtho2D(gl, 0, WIDTH, 0, HEIGHT);
gl.glMatrixMode(GL10.GL_MODELVIEW);
gl.glPushMatrix();
gl.glLoadIdentity();
square1.draw(gl);
square2.draw(gl);
gl.glPopMatrix();
gl.glMatrixMode(GL10.GL_PROJECTION);
gl.glPopMatrix();
gl.glMatrixMode(GL10.GL_MODELVIEW);
...
}
Since I don't like it one bit, is there a more efficent (and elegant)
way to do it?
Thanks
Simone
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en