How do you save a model file

Archives Forums/Blitz3D SDK Programming/How do you save a model file

monotonic(Posted 2008) [#1]
Say for instance I create/load a selection of entities, how would I then export them from within the SDK to a model file. Any format would be good, but preferably DirectX format.

Thanks in advance.


Dreamora(Posted 2008) [#2]
You would read all vertices and triangles from the surfaces on the mesh and store them manually into a file


monotonic(Posted 2008) [#3]
Really! I thought there might have been a SaveMesh or SaveEntity function, especially for the B3D format.

*pulls out the DirectX specification...urgghh*


Beaker(Posted 2008) [#4]
There is Blitz3D code in the archives to save to X or B3D. You would need to convert it of course.

Here is one:
http://blitzmax.com/codearcs/codearcs.php?code=1794

More here:
http://blitzmax.com/Community/posts.php?topic=66815


monotonic(Posted 2008) [#5]
Excellent Beaker, I will take a look thanks.