Jump to content
  • Advertisement
Sign in to follow this  
sas_x86

SetFVF or compiler do this

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

Hello.
I write this

#define FVF_COLOR (D3DFVF_XYZ | D3DFVF_TEX1 | D3DFVF_NORMAL)
SetFVF(FVF_COLOR)

but see in PIX this

IDirect3DDevice::SetFVF(D3DFVF_XYZ | D3DFVF_NORMAL | D3DFVF_TEX1)

Why?

Share this post


Link to post
Share on other sites
Advertisement
Those are bit flags and a integer value is passed in. PIX somehow has to analyze the bits from that value and does it in a different order.

The order doesn't matter here. It's the same you passed it.

Share this post


Link to post
Share on other sites
Try this in your compiler and check the result.

int i1 = D3DFVF_XYZ | D3DFVF_TEX1 | D3DFVF_NORMAL;
int i2 = D3DFVF_XYZ | D3DFVF_NORMAL | D3DFVF_TEX1;
int i3 = D3DFVF_TEX1 | D3DFVF_NORMAL | D3DFVF_XYZ;
int i4 = D3DFVF_TEX1 | D3DFVF_XYZ | D3DFVF_NORMAL;

etc..

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • 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!