Question

I'm developing an OpenGL ES 2.0 application with C++.

I want to show my blender's models using OpenGL but I don't know which is the easiest format to load with OpenGL ES 2.0.

I've been trying with Wavefront obj format how to unpacked vertices and how to obtain vertices for glDrawElements' last parameter.

Doy you know an easiest format?

Thanks.

Was it helpful?

Solution

OBJ is a pretty easy format. You can see the spec at http://www.martinreddy.net/gfx/3d/OBJ.spec

You do the loading yourself, of course. You read the .obj file and create the vertices yourself. Faces are like vertex indices.

Be careful, though: OpenGL ES 2.0 cannot render polygons other than triangles, so your obj files must not contain any other polygons or you must convert those yourself.

OTHER TIPS

I just tried a couple of formats. It looks like the PLY format ( you might have to enable that export format in the user preferences ) exports the model with only one index array. So you don't need multiple index arrays like with the Wavefront OBJ format. Which is very difficult with OpenGL. See rendering-meshes-with-multiple-indices

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top