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,否则会出错!