简体   繁体   中英

gluUnproject model-view matrix

我正在将GLU gluUnproject方法移植到现代OpenGL中,我通常了解它的背后的算法,但我的问题是为什么我们需要模型视图矩阵?它可以仅仅是视图矩阵吗?我们将屏幕坐标投影到世界空间中,所以为什么我是否还需要提供一些对象的模型矩阵(作为模型视图的一部分)?或者我可能误解了如何使用该方法?我从未真正使用过固定管道。

gluUnproject is usually described as transfroming coordinates from screen space (back) to object space. However, you can always use any matrices you like to get into some other space, so just using the view matrix here would give get you the world space values you seem to care about. The fixed function pipeline of GL never did use a world space explicitely, and always worked directly on the comopsition of the model and the view matrix.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM