flag==0:法线朝里;flag==1:法线朝外;

public void drawSelf(int[] textureId) {
		GLES20.glDisable(GLES20.GL_DEPTH_TEST);
		switch (flag) {
		case 0:
			drawCube0(textureId);
			break;
		case<u><em style="background-color: rgb(255, 255, 0);"> 1</em></u>:
			drawCube1(textureId);
			break;
		}
		GLES20.glEnable(GLES20.GL_DEPTH_TEST);
	}



centerCube = new DrawCubeTextureLight(cubeSize, cubeSize, cubeSize, ShaderManager.getJpgProgram(), 1);



public DrawCubeTextureLight(float width,float height,float length,int mProgram, int <em style="background-color: rgb(255, 204, 51);"><u>flag</u></em>) {
		frontRect = new DrawRectTextureLight(width, height,mProgram);
		leftRect=new DrawRectTextureLight(height, length, mProgram);
		bottomRect=new DrawRectTextureLight(width, length, mProgram);
		this.flag = flag;
		this.halfWidth=width/2;
		this.halfHeight=height/2;
		this.halfLength=length/2;
	}


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