DirectX problem! Need help please
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
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
I honestly can't think of a way to help you simply because i have never seen that c++ syntax.. ever
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).
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement