Best way to load a obj file on iOS [closed]

2019-03-10 04:57发布

Since OpenGL doesn't have any function like GLLoadObjFile('myModel.obj');, What's the best tutorial to load a 3d model file like .obj in a iOS app?

I've tried the wavefront loader but it doesn't seem to be working.

标签: ios opengl-es 3d
3条回答
Juvenile、少年°
2楼-- · 2019-03-10 05:16

I have used a library called Ninevegl. It is pretty good and supports file formats like .obj and .dae. It is very easy to use and they have nicely explained documentation. Here is the link.

http://nineveh.gl/downloads/

查看更多
三岁会撩人
3楼-- · 2019-03-10 05:33

I built a Perl/Xcode project for loading .obj and .mtl files into OpenGL ES 2.0 on iOS, available here. It's called mtl2opengl and you can see comments/results from other S.O. users in these similar questions:

  1. opengles display human face in iphone
  2. ios : Displaying a simple 3D model with GLEssentials sample code
  3. How to convert Blender blend (or obj) file to Qualcom Vuforia .h file
查看更多
We Are One
4楼-- · 2019-03-10 05:37

https://github.com/jlamarche/iOS-OpenGLES-Stuff/tree/master/Wavefront%20OBJ%20Loader

It's loader seems pretty decent, supporting even materials from blender, though it uses OpenGL ES 1, the loader classes should work perfectly in ES 2

查看更多
登录 后发表回答