Code example for GL10

Methods: glClearglColor4fglLoadIdentityglMultMatrixfglRotatefglTranslatef

0
	} 
 
	@Override 
	public void onDrawFrame(GL10 gl) {
//		gl.glClearColor(0.0F, 0.0F, 0.0F, 0.0F); 
		gl.glClear(GL10.GL_COLOR_BUFFER_BIT | GL10.GL_DEPTH_BUFFER_BIT);
		gl.glColor4f(1.0F, 0.0F, 0.0F, 1.0F);//设置当前色
		gl.glLoadIdentity();
		gl.glTranslatef(0.0F, 0.0F, -5.0F);//移入屏幕5.0
		gl.glMultMatrixf(rotatMatrix,0);
		gl.glRotatef(0.0F, 1.0F, 0.0F, 0.0F);
		this.redPointer.drawPointer(gl);
		gl.glColor4f(0.0F, 1.0F, 0.0F, 1.0F);
	    gl.glLoadIdentity();
	    gl.glTranslatef(0.0F, 0.0F, -5.0F);
	    gl.glMultMatrixf(rotatMatrix, 0);
	    gl.glRotatef(90.0F, 0.0F, 0.0F, 1.0F);
	    this.greedPointer.drawPointer(gl);
	    gl.glColor4f(0.0F, 0.0F, 1.0F, 1.0F);
	    gl.glLoadIdentity();
	    gl.glTranslatef(0.0F, 0.0F, -5.0F);
	    gl.glMultMatrixf(rotatMatrix, 0);
	    gl.glRotatef(-90.0F, 0.0F, 1.0F, 0.0F);
	    this.bluePointer.drawPointer(gl);
	} 
 
	@Override 
	public void onSurfaceChanged(GL10 gl, int width, int height) {
		gl.glViewport(0, 0, width, height);
Contextual code suggestions in your IDE  Get Codota for Java