Jump to content
  • Advertisement

Archived

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

Abdhl Al Hazred

Flexible Vertex Format Flags

This topic is 6237 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 it possible to combine any Flexible Vertex Format Flags? (ie. D3DFVF_XYZ | D3DFVF_DIFFUSE | D3DFVF_NORMAL | D3DFVF_TEX1) It dosn´t work for me. When the stars are right they will awake...

Share this post


Link to post
Share on other sites
Advertisement
While the flag descriptors are correct, are you ordering the variables correctly in your vertex structure? XYZ Coords come first, then normals, then color, then texture:

  
typedef struct sVertex {
float x, y, z;
float nx, ny, nz;
D3DCOLOR Diffuse;
float u, v;
} sVertex;

#define FVF (D3DFVF_XYZ | D3DFVF_NORMAL | D3DFVF_DIFFUSE | D3DFVF_TEX1)



Jim



Jim Adams
home.att.net/~rpgbook
Programming Role-Playing Games with DirectX 8

Share this post


Link to post
Share on other sites
No you cannot combine all fvf flags. There are some restrictions. For example you cannot combine D3DFVF_XYZ and D3DFVF_XYZRHW because you cannot use both transformed and untransformed coordinates in the same vertex.

-René

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!