@Override public void onDrawFrame(GL10 gl) { // System.out.println("onDrawFrame"); GLES20.glClear(GLES20.GL_DEPTH_BUFFER_BIT | GLES20.GL_COLOR_BUFFER_BIT); for (SixPointerStar star : ha) { star.drawSelf(); } }
@Override public boolean onTouchEvent(MotionEvent e) { System.out.println("onTouchEvent"); float y = e.getY(); float x = e.getX(); switch (e.getAction()) { case MotionEvent.ACTION_MOVE: { float dy = y - mPreviousY; float dx = x - mPreviousX; for (SixPointerStar star : mRenderer.ha) { star.yAngle += dy * TOUCH_SCALE_FACTOR; star.XAngle += dx * TOUCH_SCALE_FACTOR; } } break; } mPreviousX = x; mPreviousY = y; return true; }