我试着使用OpenGL ES 3来显示一个物体,所有的东西都可以正常工作直到我设置相机视角。当我将我的vPMatrix与相机矩阵和投影矩阵相乘后,物体就会消失。
float[] projectionMatrix = new float[16];
float[] vPMatrix = new float[16];
float[] camera = new float[16];
Matrix.frustumM(
projectionMatrix,
0,
-1,
1,
-1,
1,
3,
7
);
Matrix.setLookAtM(
camera
, 0
//where i am
, 0f
, 0f
, 1f
//what i looking for
, 0f
, 0f
, -1f
//where is top
, 0f
, 1f
, 0f
);
Matrix.multiplyMM(
vPMatrix,
0,
projectionMatrix,
0,
camera,
0
);