Code example for GL10

Methods: glPopMatrix, glPushMatrix, glTranslatef

0
        /* Do not create GLViews twice */ 
        mGLViewsCreated = true;
    } 
 
    private void drawTouchSurface(GL10 gl) {
	gl.glPushMatrix();
	gl.glTranslatef(
		convertToLevel(LEVEL_TOUCH, PROJ_LEFT)
		, convertToLevel(LEVEL_TOUCH, PROJ_BOTTOM )
		, 0f);// move to Left-Top 
	gl.glTranslatef(0f, 0f, LEVEL_0);   // after rotating, the Z-axis upside down
 
	mTouchSurface.draw(gl);
	gl.glPopMatrix();
    } 
 
    public void drawGLViews(GL10 gl) {
	GLObject obj;
 
	gl.glMatrixMode(gl.GL_MODELVIEW);