Jump to content
  • Advertisement
Sign in to follow this  
Guest

DirectX problem! Need help please

This topic is 3035 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Guest
Hi im using directX in c++ via windows forms and im having a problem when trying to load a .x meshfile private: void LoadMesh(string filename, Mesh^ mesh, array<Material,1>^ meshmaterials, array<Texture^,1>^ meshtextures, float^ meshradius) { array<ExtendedMaterial,1>^ materialarray=nullptr; mesh=Mesh::FromFile(filename, MeshFlags::Managed,device,materialarray); } I get the error-> Error 10 error C2665: 'Microsoft::DirectX::Direct3D::Mesh::FromFile' : none of the 8 overloads could convert all the argument types Thanks for any help

Share this post


Link to post
Share on other sites
Advertisement
Google the function your using. You should find an explanation of it's parameters and how to use it on msdn. You should compare the datatypes of the data you pass as arguments to the function parameters datatype.

I honestly can't think of a way to help you simply because i have never seen that c++ syntax.. ever

Share this post


Link to post
Share on other sites
Quote:

I honestly can't think of a way to help you simply because i have never seen that c++ syntax.. ever

That's because it's not C++. It's C++/CLI (VS 2003's Managed Extensions for C++ had more cruft). Your assertion, however, that reading the documentation should help is accurate.

Since Waaayoff has provided you an answer to your question, I feel compelled to ask why you're using C++/CLI and MDX? It's just about the worst possible combination of technologies you could think. C++/CLI is geared primarily for writing interoperability code between native and managed domains, and MDX is dead.

If you want to use C++, you can just use C++ and native DirectX. If you want to use managed code, you could be using C# and SlimDX (or XNA).

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!