简体   繁体   English

Xcode上的OpenGL ES中的一个球体(世界)

[英]A sphere (the world) in OpenGL ES on Xcode

Is there a way, using only Objective-C, that I can make a 3d sphere and then put texture on it to make it look like the earth. 有没有一种方法,仅使用Objective-C,我可以制作一个3D球体,然后在其上贴上纹理以使其看起来像地球。 I am completely new to OpenGL ES for iOS so please keep it simple. 我是iOS OpenGL ES的全新用户,因此请保持简单。

There is no way to do this directly, but you can find lots of samples that would require just copy paste to do that. 无法直接执行此操作,但是您可以找到很多仅需要复制粘贴即可完成的示例。

Take this for textured object: http://www.raywenderlich.com/4404/opengl-es-2-0-for-iphone-tutorial-part-2-textures And this to generate a sphere: http://www.khronos.org/message_boards/showthread.php/4631-How-to-make-textures-mapping-to-sphere 将此用于带纹理的对象: http : //www.raywenderlich.com/4404/opengl-es-2-0-for-iphone-tutorial-part-2-textures并生成一个球体: http:// www。 khronos.org/message_boards/showthread.php/4631-How-to-make-textures-mapping-to-sphere

And if you combine those :-) you'll get a textured cube 如果将它们组合在一起:-),您将获得一个纹理立方体

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

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