简体   繁体   English

如何使用XCode 8.x执行gluUnProject()?

[英]How to do gluUnProject() with XCode 8.x?

I basically want to do the trick described here - figuring out world coords given screen coords. 我基本上想做这里描述的技巧-根据屏幕坐标找出世界坐标。

However, the status of gluUnProject() is very unclear. 但是, gluUnProject()的状态尚不清楚。 I can see that it is supposed to be provided by the "OpenGL Utility" library (glu). 我可以看到它应该由“ OpenGL Utility”库(glu)提供。

This old looking documentation says that Apple implement glu. 这份看起来很陈旧的文档说苹果使用了glu。 The link it gives points to another page that says XCode is supposed to supply all this. 它提供的链接指向另一个页面,该页面指出XCode应该提供所有这些功能。

XCode 8.x brings with it an OpenGLES framework. XCode 8.x带有OpenGLES框架。 However, the only headers I can find are the most basic ones (gl.h and glext.h). 但是,我只能找到最基本的标头(gl.h和glext.h)。

No glu.h 没有胶水

So how does one do gluUnProject() , or any equivalent means of working out the world coords from screen coords? 那么,如何使用gluUnProject()或从屏幕坐标中得出世界坐标的任何等效方法呢?

答案是“使用GLKMathUnproject() ”,从GLKit

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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