Jump to content
  • Advertisement
Sign in to follow this  
adt7

[SlimDX] Mesh.Clone (D3DERR_INVALIDCALL: Invalid call (-2005530516)) [Solved]

This topic is 3260 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

I'm currently having issues with the Mesh.Clone method in SlimDX. I've reduced my code down to the simplest possible form to try and troubleshoot, but I just can't see what's wrong.
mesh = Mesh.FromFile(d3dDevice, filename, MeshFlags.SystemMemory);
VertexElement[] elements = mesh.GetDeclaration();

Mesh temp;
temp = mesh.Clone(d3dDevice, MeshFlags.SystemMemory, elements);



This work fine with a very simple box mesh, but when I try it with anything else (for example the Stanford dragon), I get D3DERR_INVALIDCALL: Invalid call (-2005530516) on the mesh.Clone line. The debug runtimes don't come up with anything, although I do get the following in my output window:
A first chance exception of type 'SlimDX.Direct3D9.Direct3D9Exception' occurred in SlimDX.dll
An unhandled exception of type 'SlimDX.Direct3D9.Direct3D9Exception' occurred in SlimDX.dll

Additional information: D3DERR_INVALIDCALL: Invalid call (-2005530516)


I'm completely lost with this, surely cloning a mesh with exactly the same elements shouldn't cause a problem. [Edited by - adt7 on August 17, 2009 11:43:31 AM]

Share this post


Link to post
Share on other sites
Advertisement
I can't be the only person in the world using the Mesh.Clone method.

EDIT: ... and I've just figured it out, I needed MeshFlags.Use32Bit.

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!