Hi,
I've recently started using 'd3dx9d' when in debug mode, and noticed the following warning during debugging:
D3DX: ID3DXMesh::GetFVF: The declaration cannot be converted to an FVF
After some debugging I found out the warning is generated several times during the execution of loading an X mesh, this is the line of code:
if(FAILED(D3DXLoadMeshFromXA(pXfilename.c_str(),
D3DXMESH_MANAGED, //SYSTEMMEM, // DYNAMIC??? SYSTEMMEM FOR DYNAMIC OBJECTS??
mD3ddev,
&mAdjacencyBuffer,
&mMaterialBuffer,
NULL,
&mSubMeshSize,
&mMesh))) return false;
Do you have any idea what could case these annoying warnings?
As far as I am aware of I don't use FVF's anywhere in my code/ engine, everything I do uses vertex declarations.
It seems to happen only when my X file mesh that's loaded, already has binormals and tangents.
For X file meshes that don't have them yet, I calculate them using d3dxcomputetangentframeex.
The vertex declaration I use throughout the whole engine does include binormals and tangents:
typedef struct TVERTEX
{
D3DXVECTOR3 position;
D3DXVECTOR3 normal;
float tex[2];
D3DXVECTOR3 binormal;
D3DXVECTOR3 tangent;
} TVERTEX;
const D3DVERTEXELEMENT9 vtxdecl[] =
{
{0, 0, D3DDECLTYPE_FLOAT3, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_POSITION, 0},
{0, 12, D3DDECLTYPE_FLOAT3, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_NORMAL, 0},
{0, 24, D3DDECLTYPE_FLOAT2, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_TEXCOORD, 0},
{0, 32, D3DDECLTYPE_FLOAT3, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_BINORMAL, 0},
{0, 44, D3DDECLTYPE_FLOAT3, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_TANGENT, 0},
D3DDECL_END()
};
Any ideas?
Ps.; the end result is fine by the way, just want to understand/ remove the warnings