DirectX problem! Need help please

Started by
2 comments, last by jpetrie 14 years ago
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
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
"Spending your life waiting for the messiah to come save the world is like waiting around for the straight piece to come in Tetris...even if it comes, by that time you've accumulated a mountain of shit so high that you're fucked no matter what you do. "
It's "managed" C++...*shudder*
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