Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private void draw() {
- GlUtil.checkGlError("draw start");
- glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
- Long frameTime = System.currentTimeMillis() - animationChangeTimer;
- if (sUptime < System.currentTimeMillis()) {
- isAnimationOn = false;
- }
- // Long start = System.currentTimeMillis();
- // DrawWall(frameTime);
- setIdentityM(mModelMatrix, 0);
- if (isAnimationOn) {
- rotateAnimator.rotate(mModelMatrix, frameTime, hairTextureProgram);
- translateAnimator.translate(mModelMatrix, frameTime, hairTextureProgram);
- }
- multiplyMM(mMVPMatrix, 0, mVPMatrix, 0, mModelMatrix, 0);
- DrawEyes(frameTime);
- DrawThroat();
- DrawTongue();
- glDepthFunc(GL_ALWAYS);
- DrawTeeth(frameTime);
- glDepthFunc(GL_LESS);
- glClear(GL_DEPTH_BUFFER_BIT);
- DrawHead(frameTime);
- DrawHair();
- DrawAccessory();
- DrawHairBangs();
- // Log.e(TAG, "DrawTime: " + String.valueOf(System.currentTimeMillis() - start));
- GlUtil.checkGlError("draw done");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement