MS3D MilkShape Format - Lets Draw Something
Author bkenwright@xbdev.net
Well Its all nice and
well getting this information from the file, and well its very good, but its
so much cooler when we can actually draw this information and actually see the
shapes or models that we have in the 3d file!...so we'll add in some simple
windows and directx code so we can start drawing this data.
To make our code more
flexible and easier to plug in and expand, we'll put the ms3d code in its own
class, which we contain all our reading and render code....all nice and tidy
that way I think.
This version of the
rendering code has been kept so so so simple! I mean its not the most
efficient, but it is great for testing your code, and it should be 100% safe
and has no memory leaks. So you could easily modify it into a small app
for rendering test models in a tester, where your only concerned with checking
that your work is in the file and its correct :)
Download Source Code
(13kb) The demo program is a very simplified example that loads in the
ms3d data and then renders it to the screen using DirectX. Compiled
with dx9.1 and Visual Studio
|
|
|