@Override public void onNewFrame(HeadTransform headTransform){
  Matrix.rotateM(modelCube,0,TIME_DELTA,0.5f,0.5f,1.0f);
  Matrix.setLookAtM(camera,0,0.0f,0.0f,CAMERA_Z,0.0f,0.0f,0.0f,0.0f,1.0f,0.0f);
  headTransform.getHeadView(headView,0);
  headTransform.getQuaternion(headRotation,0);
  checkGLError("onReadyToDraw");
}

@ Override public void onNewFrame ( HeadTransform headTransform ) { Matrix . rotateM ( modelCube , 0 , TIME_DELTA , 0.5f , 0.5f , 1.0f ) ; Matrix . setLookAtM ( camera , 0 , 0.0f , 0.0f , CAMERA_Z , 0.0f , 0.0f , 0.0f , 0.0f , 1.0f , 0.0f ) ; headTransform . getHeadView ( headView , 0 ) ; headTransform . getQuaternion ( headRotation , 0 ) ; checkGLError ( "onReadyToDraw" ) ; }
prepares opengl es before we draw a frame .
