glGetDoublev(GL_MODELVIEW_MATRIX)
时间: 2023-09-20 11:05:40 浏览: 176
屏幕坐标向OpenGL坐标的转换(完整版)
3星 · 编辑精心推荐
This function retrieves the current modelview matrix as a 4x4 matrix of double-precision floating-point values. The modelview matrix is used to transform vertex coordinates from object space to eye space, where they are then further transformed by the projection matrix to produce clip coordinates. The resulting clip coordinates are then divided by the clip coordinate's fourth component to produce normalized device coordinates, which are then transformed by the viewport matrix to produce window coordinates.
The retrieved matrix can be used for various purposes, such as calculating the direction of the camera, transforming normals, or performing custom transformations in the vertex shader.
阅读全文