내가 직교 행렬을 설정이 방법 :는 OpenGL ES 2.0 : 직교에서 관점에 (카드 플립 효과)
float widthF = (right - left)/numColumns; // left to right
float heightF = (bottom - top)/numRows; // top to bottom
for (int row = 0; row < numRows; ++row) {
for (int col = 0; col < numColumns; ++col) {
float x1 = left + col * widthF;
float y1 = top + row * heightF;
float x2 = left + (col + 1) * widthF;
float y2 = top + (row + 1) * heightF;
float z = 0f;
// and so on, add to vertex buffer
}
}
그리고 결과 : 일부 타일 만들기
ratio = (float) width/height;
left = -ratio;
right = ratio;
bottom = -1f;
top = 1f;
Matrix.orthoM(projectionMatrix, 0, left, right, bottom, top, -1f, 1f);
viewProjMatrix = projectionMatrix;
이 방법을 수행 이다 : 나는 perspec를 사용하는 경우
이 더 나은 보일 수 있습니다 적인 대신 직교 행렬의 매트릭스 :
Matrix.frustumM(projectionMatrix, 0, left, right, bottom, top, 1f, 10f);
Matrix.setLookAtM(viewMatrix, 0, 0f, 0f, 2f, 0f, 0f, 0f, 0f, 1f, 0f);
Matrix.multiplyMM(viewProjMatrix, 0, projectionMatrix, 0, viewMatrix, 0);
그리고 그 결과는 다음과 같습니다
하지만, 어떻게 이미지가 뷰포트를 채우는 의미 "전체 화면"에 표시 얻을? 직교 행렬이 뷰포트를 채우는 방식이지만 이번에는 원근감을 보입니다.
는