clear up FVF

Started by
2 comments, last by nosajghoul 21 years, 9 months ago
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
normal_toes@hotmail.com
Advertisement
Look up "Flexible Vertex Formats Flags" in the SDK.

Hope this helps.

[edited by - Sheep on June 23, 2002 9:39:53 PM]
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 coordsFLOAT t, s; //texture coords}vertex_t;  


Geddit?
got it! thank you so much, I think i just needed to hear it another way, it makes sense now.
normal_toes@hotmail.com

This topic is closed to new replies.

Advertisement