gluPerspective
的返回与文档中的公式不同
IBM-doc
和Khronos doc中描述的
gluPerspective
的公式是
glMatrixMode(GL_PROJECTION)
glLoadIdentity()
gluPerspective(fov_h, aspect_ratio, near, far)
projection_matrix = glGetFloatv(GL_PROJECTION_MATRIX)
结果看起来太像了:
gluPerspective(45.0, 4/3, 0.1, 100)
返回:[[ 1.8106601 0. 0. 0. ]
[ 0. 2.4142137 0. 0. ]
[ 0. 0. -1.002002 -1. ]
[ 0. 0. -0.2002002 0. ]]
所以:
这篇维基百科文章。