有了位置 和 朝向, 此时摄像机可以 360 度旋转, 这是我们需要一个 up 方向, 将摄像机固定在一个位置一个方向;
设置摄像机的方法 :
void android.opengl.Matrix.setLookAtM...left, float right, float bottom, float top 参数 : 近平面的 左, 右, 下, 上 的值;
-- float near 参数 : 近平面 与 视点之间的距离...视口并不是占手机全部屏幕, 是显示投影的部分, 也可以是一个 View 组件;
视口设置方法 :
void android.opengl.GLES20.glViewport(int x, int y...;
import android.content.res.Resources;
import android.opengl.GLES20;
import android.util.Log;
/*...;
import android.opengl.GLES20;
import android.opengl.GLSurfaceView;
import android.view.MotionEvent;