Code example for GL10

Methods: glClear, glEnable, glLoadIdentity, glRotatef, glTranslatef

0
	/** 
	 * Here we do our drawing 
	 */ 
	public void onDrawFrame(GL10 gl) {
		//Clear Screen And Depth Buffer 
		gl.glClear(GL10.GL_COLOR_BUFFER_BIT | GL10.GL_DEPTH_BUFFER_BIT);	
		gl.glLoadIdentity();					
		gl.glEnable(GL10.GL_LIGHTING);
		gl.glTranslatef(0.0f, -1.2f, -z);	//Move down 1.2 Unit And Into The Screen 6.0
		gl.glRotatef(xrot, 1.0f, 0.0f, 0.0f);	//X
		gl.glRotatef(yrot, 0.0f, 1.0f, 0.0f);	//Y
		model.draw(gl);						//Draw the square
		gl.glLoadIdentity();
		 
		xrot += xspeed;
		yrot += yspeed;
		 
	} 
 
	/** 
	 * If the surface changes, reset the view