Sign in to follow this  
harminal

DirectX problem! Need help please

Recommended Posts

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
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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this