Greeting!
I find many samples in DXSDK invoke SetVertexDeclaration() before using effect, and I also find it still works normally if i remove the SetVertexDeclaration.
So i want to know is it necessary to invoke SetVertexDelaration() before we use effect?
is it necessary to invoke SetVertexDelaration() before we use effect?
Started by Jeason, Mar 13 2012 06:50 AM
4 replies to this topic
Ad:
#4 Members - Reputation: 332
Posted 13 March 2012 - 09:11 AM
There's an exact vertex declaration equivalent for every FVF. And every mesh has a FVF property. So, you don't need to manually call IDirect3DDevice9::SetVertexDeclaration(), because ID3DXMesh::DrawSubset() function calls IDirect3DDevice9::SetVertexDeclaration() before calling SetStreamSource() and SetIndices().
There's no "hard", and "the impossible" takes just a little time.






