Archived

This topic is now archived and is closed to further replies.

infinitycool

FInding the size of a FVF

Recommended Posts

Is there a way to find the size of a FVF when you only know the DWORD describing the FVF? I want to use ID3DXMesh to load the mesh and then copy the verticies into a VB but I need to know the size of the vertices in order to create the VB. I know you can do something like this: if(D3DFVF_DIFFUSE & theFVF) sizeOfFVF += sizeof(DWORD); if(D3DFVF_NORMAL & theFVF) sizeOfFVF += sizeof(float)*3; if(D3DFVF_XYZ & theFVF) sizeOfFVF += sizeof(float)*3; if(D3DFVF_XYZRHW & theFVF) sizeOfFVF += sizeof(float)*4; ....... but I don''t know how to do the texture coodinate part. Has anyone done this before?

Share this post


Link to post
Share on other sites