Jump to content

  • Log In with Google      Sign In   
  • Create Account

We're offering banner ads on our site from just $5!

1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


what is the difference between SetFVF and SetVertexDeclaration


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
2 replies to this topic

#1 tcige   Members   -  Reputation: 206

Like
0Likes
Like

Posted 12 June 2013 - 09:18 AM

i find using SetFVF is ok for shader program, and using SetVertexDeclaration is also ok for fvf program

 

so what is the difference



Sponsor:

#2 mhagain   Crossbones+   -  Reputation: 8275

Like
3Likes
Like

Posted 12 June 2013 - 10:21 AM

Among the differences:

 

FVF codes are limited to a single stream (stream 0) whereas declarations can use multiple streams.

FVF codes are limited to pre-defined formats (e.g. texcoords as floats, colours as D3DCOLOR, positions as 3 or 4 components) whereas declarations are much more flexible.

FVF codes can't have overlapping data, declarations can.


It appears that the gentleman thought C++ was extremely difficult and he was overjoyed that the machine was absorbing it; he understood that good C++ is difficult but the best C++ is well-nigh unintelligible.


#3 Alin   Members   -  Reputation: 391

Like
3Likes
Like

Posted 12 June 2013 - 12:03 PM

FVF is the old style before dx8 while decl is the new style mainly used in dx9.

FVF has no D3DFVF_TANGENT and D3DFVF_BINORMAL while decl has D3DDECLUSAGE_TANGENT and D3DDECLUSAGE_BINORMAL, etc.

FVF use fixed vertex format while decl use flexible vertex format and its vertex elements can be specified in any order.






Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS