Code example for GL10

Methods: glClear, glLoadIdentity, glMatrixMode, glTranslatef, gluLookAt

0
		} 
 
		@Override 
		public void onDrawFrame(GL10 gl) {
			// TODO Auto-generated method stub 
			gl.glClear(GL10.GL_COLOR_BUFFER_BIT | GL10.GL_DEPTH_BUFFER_BIT);
			 
			gl.glMatrixMode(GL10.GL_MODELVIEW);
			gl.glLoadIdentity();
			GLU.gluLookAt(gl, 0, 0, -5, 0, 0, 0, 0, 3, 0);
			if (x != 0 && y != 0){	
				 
			gl.glTranslatef(0, 0, zoomz);
				if (zoomz >-5) {
				zoomz-=.1;	
					}			 
				if (zoomz<-5 && x>0 && y>0){
					x = 0;
					y = 0;
					zoomz =0;
				} 
			}; 
			square.draw(gl);
			/*if (x>0 && y>0){ 
				x = 0; 
				y = 0; 
			}*/ 
			}