Jump to content
  • Advertisement


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


FInding the size of a FVF

This topic is 6175 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.

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!