DirectX .X files with VB.net

I have a VB.net app in Visual Studio 2008 that I need to add a small amount of 3D graphics to.  I have the newest Directx SDK.  I am familiar with VB but new to Directx.

I am able to make shapes and graphics from within the app by defining vertices etc, but these are just simple shapes.  What I would like to do is import the .X files I have made from 3DS Max into my VB app.  

I have seen references online to a D3DXLoadMeshFromX method, but I do not see it anywhere in the Directx SDK, and all examples I see attempting to use this method are in C++.  Could I get some help on how to use my .X file in my VB app?! Thanks.



andyfettAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

ikeworkCommented:
hi andyfett

here is an example:

http://www.gamedev.net/reference/articles/article1606.asp


ike
0
andyfettAuthor Commented:
Actually both of those links are for Directx 8 and it looks like VB6...

I notice they use the  LoadMeshFromX() method, which looks like what i'd want,  but I don't see that anywhere in the new SDK...
0
Cloud Class® Course: CompTIA Healthcare IT Tech

This course will help prep you to earn the CompTIA Healthcare IT Technician certification showing that you have the knowledge and skills needed to succeed in installing, managing, and troubleshooting IT systems in medical and clinical settings.

ikeworkCommented:
oh sorry your right. the Mesh-class has a static member-method called FromFile

Mesh m = Mesh.FromFile( "file.x" ...

here is the doc:

http://msdn.microsoft.com/archive/en-us/directx9_m_Oct_2004/directx/ref/ns/microsoft.directx.direct3d/c/mesh/m/fromfile.asp?frame=true
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
andyfettAuthor Commented:
I have attached a sample .X file here.  I would love to see how this is loaded into a VB.net DirectX9 app if possible.  Thanks.
Torus.txt
0
ikeworkCommented:
0
andyfettAuthor Commented:
Thanks ikework, mesh.fromfile() is exactly what I was looking for and got me on the right track.

Another good example is the "progressive meshes" example at http://www.codesampler.com/usersrc/usersrc_3.htm

p.s. your last example was C# not VB :)

0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Game Programming

From novice to tech pro — start learning today.