ios : Displaying a simple 3D model with GLEssentials sample code

烈酒焚心 提交于 2019-12-07 22:45:08

问题


My goal is to display a simple 3D model and apply a texture on it.

I've downloaded the GLEssentials ios sample project to learn how to develop this (i'm new in ios OpenGL-ES API)

But the example model is a .model file, which I never heard about and which never appear in model bank websites.

  1. What is this kind of file?
  2. is the sample code compatible with other common model types (.obj, .c2d, .3ds)?
  3. is it a good idea to start from this project?

回答1:


Have a look at this question:

  • How to convert Blender blend (or obj) file to Qualcom Vuforia .h file

In my answer, I describe a script and accompanying Xcode project that converts .obj/.mtl files to header files suitable for OpenGL ES on iOS [link].

In response to your questions:

  1. I believe the .model file is only appropriate for the sample project and is a proprietary Apple extension. It most likely contains simple data such as vertex positions.
  2. I think you'd struggle to fit other model types into the sample code, which is very complex for OpenGL ES beginners. You might want to have a look at .pod files on Cocos2D here. I've seen and heard great things about it.
  3. I wouldn't recommend it :)


来源:https://stackoverflow.com/questions/15029300/ios-displaying-a-simple-3d-model-with-glessentials-sample-code

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!