创建场景

public void onDrawFrame(GL10 gl) {
			// TODO Auto-generated method stub
			GLES20.glClear(GLES20.GL_DEPTH_BUFFER_BIT | GLES20.GL_COLOR_BUFFER_BIT);

			if (isScreenSaver) {
				drawScreenSaver();
			} else {

				if (SPIRIT_OFFSET > 2 * ratio) {
					SPIRIT_OFFSET = 0;
					spirtMoveFlag = true;
					moveFlag = false;
				}

				if ((saveIndex[0] == 0 && saveIndex[1] == 1) || (saveIndex[0] == 1 && saveIndex[1] == 0)) {
					compoundIndex = 2;
				}
				if ((saveIndex[0] == 2 && saveIndex[1] == 3) || (saveIndex[0] == 3 && saveIndex[1] == 2)) {
					compoundIndex = 3;
				}

				if (!spirtMoveFlag) {
					drawSpirit();
					drawColorEdge();
				} else {
					drawSpiritBlank1();

				}

				drawRightBackground();

			}
		}

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