Not quite, Halsafar...
Quote:
D3DFVF_TEXCOORDSIZE2(0) for example sets the second set of texture coords to the regular uv coords.
The two in the macro does not mean the second set. It's the zero in the brackets which tells you which set we are editing. In this case the first set (since an index of 0 would be the first position of an array).
D3DFVF_TEXCOORDSIZE2(0)
Think of this macro as a function like SetTexCoordSize2D(int indexPosition)
where you pass the index of the set you whish to modify to 2D. Then you can apply the same thinking to the other versions.
D3DFVF_TEXCOORDSIZE3(1) or SetTexCoordsSize3D(int indexPosition)
Now you are giving the macro a set index you wish to convert to 3D tex co-ords.
So in your original example:
#define D3DFVF_BLENDVERTEX (D3DFVF_XYZ | D3DFVF_TEX3 | D3DFVF_TEXCOORDSIZE2(2) | D3DFVF_TEXCOORDSIZE2(1) |D3DFVF_NORMAL | D3DFVF_TEXCOORDSIZE2(0) )
We can see that the first set (set index 0) is being set to 2D (D3DFVF_TEXCOORDSIZE2(0)), the second set (set index 1) is being set to 2D (D3DFVF_TEXCOORDSIZE2(1)), and the third set (set index 2) is being set to 2D as well (D3DFVF_TEXCOORDSIZE2(2)).
And this makes sense, since that vertex you defined only has UV texture coords, and you'll notice that you defined MAX_MATRIX_INDEX as 2... all 3 positions in that array you have defined as 2D through those macros.
Hope this is a little clearer.
---------------------------------------------------------------"The problem with computers is they do what you tell them.""Computer programmers know how to use their hardware."- Geek#