Jump to content
  • Advertisement


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


FInding the size of a FVF

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

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

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!