透明度设置的问题

private void draw5Big(float z,float r,float g,float b,float a){
		MatrixState.pushMatrix();
		MatrixState.translate(0, 0, z);
		drawBallColorBig.drawSelf(r, g, b, a);
		MatrixState.popMatrix();
		
		MatrixState.pushMatrix();
		MatrixState.translate(-offset, offset, z);
		drawBallColorBig.drawSelf(r, g, b, a);
		MatrixState.popMatrix();
		
		MatrixState.pushMatrix();
		MatrixState.translate(-offset, -offset, z);
		drawBallColorBig.drawSelf(r, g, b, a);
		MatrixState.popMatrix();
		
		MatrixState.pushMatrix();
		MatrixState.translate(offset, offset, z);
		drawBallColorBig.drawSelf(r, g, b, a);
		MatrixState.popMatrix();
		
		MatrixState.pushMatrix();
		MatrixState.translate(offset, -offset, z);
		drawBallColorBig.drawSelf(r, g, b, a);
		MatrixState.popMatrix();
		
	}



要注意float a  设置成小数时应该有单位f,否则会出错!

posted @ 2015-06-11 21:43  Anzhongliu  阅读(356)  评论(0编辑  收藏  举报