I wrote a simple 3D wireframe renderer in openGL. I made most of the things manually, like calculating pixel coordinates and the model, view and pixel matrices needed for that and so on. The only openGL feature I used is the simple draw-command to render individual triangles.
The way this program works is that it takes a number of triangle meshes, transforms them and then renders them. A triangle mesh is nothing more than a vector of vertices and a vector of indices. Those can easily be transformed in-place their storage structure and passed on to openGL pretty easily.
I manually define simple meshes (like a cube for example) inside the source code. But I’d like to import some larger models as well.
fbx is a common file format, which stores 3D objects. I have searched a few forums for a little while but didn’t find anything that seemed relevant to my case.
Is there any way to manually extract the vertices and indices from an fbx file? I know an fbx file contains more stuff, but those two things are the only things I’m interested in.
If fbx doesn’t work, any other 3D format that allows me to extract vertices and indices would also be appreciated.