Advertisement
Guest User

Untitled

a guest
Jan 17th, 2018
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.15 KB | None | 0 0
  1. private void draw() {
  2.         GlUtil.checkGlError("draw start");
  3.         glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
  4.  
  5.         Long frameTime = System.currentTimeMillis() - animationChangeTimer;
  6.  
  7.         if (sUptime < System.currentTimeMillis()) {
  8.             isAnimationOn = false;
  9.         }
  10.  
  11. //        Long start = System.currentTimeMillis();
  12. //        DrawWall(frameTime);
  13.  
  14.         setIdentityM(mModelMatrix, 0);
  15.         if (isAnimationOn) {
  16.             rotateAnimator.rotate(mModelMatrix, frameTime, hairTextureProgram);
  17.             translateAnimator.translate(mModelMatrix, frameTime, hairTextureProgram);
  18.         }
  19.         multiplyMM(mMVPMatrix, 0, mVPMatrix, 0, mModelMatrix, 0);
  20.  
  21.         DrawEyes(frameTime);
  22.  
  23.         DrawThroat();
  24.         DrawTongue();
  25.         glDepthFunc(GL_ALWAYS);
  26.         DrawTeeth(frameTime);
  27.         glDepthFunc(GL_LESS);
  28.         glClear(GL_DEPTH_BUFFER_BIT);
  29.  
  30.         DrawHead(frameTime);
  31.  
  32.         DrawHair();
  33.         DrawAccessory();
  34.         DrawHairBangs();
  35. //        Log.e(TAG, "DrawTime: " + String.valueOf(System.currentTimeMillis() - start));
  36.  
  37.         GlUtil.checkGlError("draw done");
  38.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement