i find using SetFVF is ok for shader program, and using SetVertexDeclaration is also ok for fvf program
so what is the difference
Jump to content
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.
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.