问题
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.
- What is this kind of file?
- is the sample code compatible with other common model types (.obj, .c2d, .3ds)?
- 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:
- 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.
- 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.
- I wouldn't recommend it :)
来源:https://stackoverflow.com/questions/15029300/ios-displaying-a-simple-3d-model-with-glessentials-sample-code