where can i find the D3DFVF format

Started by
20 comments, last by tcige 11 years ago
The helper function D3DXDeclaratorFromFVF will give you an array of vertex elements (which you can use to create a matching vertex declaration) from any FVF you can think of. These elements tell you the exactly how your struct has to look. For C++ there's also the offsetof macro to check if your offsets really match with your declaration/FVF.

You can also look at the SDK samples (or any other working sample) that still uses FVF to learn how a such a struct looks and works.

As an aside: Without the fixed function pipeline (shaders) you rather go the other way round: You first define your struct and then define a matching vertex declaration (since FVF isn't really, well, flexible).
Advertisement

The helper function D3DXDeclaratorFromFVF will give you an array of vertex elements (which you can use to create a matching vertex declaration) from any FVF you can think of. These elements tell you the exactly how your struct has to look. For C++ there's also the offsetof macro to check if your offsets really match with your declaration/FVF.

You can also look at the SDK samples (or any other working sample) that still uses FVF to learn how a such a struct looks and works.

As an aside: Without the fixed function pipeline (shaders) you rather go the other way round: You first define your struct and then define a matching vertex declaration (since FVF isn't really, well, flexible).

this function is awesome and really what i want

thanks a lot

This topic is closed to new replies.

Advertisement