Пример #1
0
  @Override
  public void onDrawFrame(GL10 gl) {
    // Clear Screen And Depth Buffer
    gl.glClear(GL10.GL_COLOR_BUFFER_BIT | GL10.GL_DEPTH_BUFFER_BIT);
    gl.glLoadIdentity(); // Reset The Current Modelview Matrix

    mAnim.computeAndApply();
    mQuadShape.draw(gl);
  }
Пример #2
0
 public Render(GLSurfaceView surface) {
   mSurface = surface;
   mQuadShape = new QuadShape();
   Interpolator interpolator = new BounceInterpolator();
   Animation animTranslate = new GotoAnimation(0f, 0f, 2f, 2f, -6f, -50f, interpolator, 5000);
   Animation animRotate = new RotateAnimation(45, 135, 180, 0, 0, 359, interpolator, 5000);
   mAnim = new SequentialAnimation(Arrays.asList(new Animation[] {animTranslate, animRotate}));
   mAnim.setTarget(mQuadShape);
 }