DWORD mesh_FVF = D3DFVF_XYZ | D3DFVF_DIFFUSE | D3DFVF_TEX1 | D3DFVF_NORMAL;
...
mesh->CloneMeshFVF(D3DXMESH_SYSTEMMEM, mesh_FVF, localDevice, &clonedMesh);
but if I have something like #define MESHFVF (D3DFVF_XYZ | D3DFVF_DIFFUSE | D3DFVF_TEX1 | D3DFVF_NORMAL), and pass that into the function it's fine. Please help, Thanks.
CloneMeshFVF() problems
Hi, I'm trying to make the CloneMeshFVF() function work by passing in a DWORD variable, and not a "#define" variable, and if I do that It always fails.
For example
Quote:Original post by Sc4Freak
...what exactly is the error you're getting?
I'm not getting any error, but I'm testign the funtion with FAILED(), and it fails everytime I pass in a variable DWORD
Exactly, so what's the HRESULT returned?
Anyway, I don't see why that should cause an error. I suspect that you're somehow erroneously manipulating the value of mesh_FVF somewhere, before passing it to CloneMeshFVF. Try setting the value of mesh_FVF just before you call CloneMeshFVF, and tell us what happens.
Anyway, I don't see why that should cause an error. I suspect that you're somehow erroneously manipulating the value of mesh_FVF somewhere, before passing it to CloneMeshFVF. Try setting the value of mesh_FVF just before you call CloneMeshFVF, and tell us what happens.
Quote:Original post by Sc4Freak
Exactly, so what's the HRESULT returned?
Anyway, I don't see why that should cause an error. I suspect that you're somehow erroneously manipulating the value of mesh_FVF somewhere, before passing it to CloneMeshFVF. Try setting the value of mesh_FVF just before you call CloneMeshFVF, and tell us what happens.
Thanks :) yeah, that was it, I set it right before the CloneMeshFVF() and it worked fine, but why won't it work when I try to initialize it in the constructor? I am sure that I'm not manipulating anywhere before the call to clone (I searched the document for mesh_FVF, and it only found it in two places, first when I declare it, and second inside CloneMeshFVF()
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement