Archived

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

clear up FVF

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

Im confused about the following statement : const FVF = D3DFVF_XYZ|D3DFVF_NORMAL|D3DFVF_TEX1 While the SDK documentation for DX is good, (every keyword so far has come up with a fair explanation), it does not tell anything about D3DFVF_XYZ or its counterparts (D3DFVF_* etc...). What do these mean? I know theyre required, but is there a list or something to explain it a little better? Sorry if this question is cheese. Im a noobie. -Jason

Share this post


Link to post
Share on other sites
Those are the flexible vertex format flags. You use those in defining your FVF so D3D knows which properties you will have in your vertex format. For example, if the position of a vertex would be defined by X, Y, and Z coordinates:

D3DFVF_XYZ

And if the FVF were to hold texture coords:

D3DFVF_TEX1

So lets say we have:

#define MYFVF D3DFVF_XYZ|D3DFVF_TEX1

Then when your vertex structure is defined:


  
typedef struct _tag_vertex
{
FLOAT x, y, z; //vertex coords

FLOAT t, s; //texture coords

}vertex_t;


Geddit?

Share this post


Link to post
Share on other sites