Direct3D 宣告與 FVF 代碼之間的對應 (Direct3D 9)
下表會將 D3DVERTEXELEMENT9 宣告的成員對應至 FVF 程式碼。
資料類型 | 使用方式 | 使用量索引 | FVF |
---|---|---|---|
D3DDECLTYPE_FLOAT3 | D3DDECLUSAGE_POSITION | 0 | D3DFVF_XYZ |
D3DDECLTYPE_FLOAT4 | D3DDECLUSAGE_POSITIONT | 0 | D3DFVF_XYZRHW |
D3DDECLTYPE_FLOATn | D3DDECLUSAGE_BLENDWEIGHT | 0 | D3DFVF_XYZBn |
D3DDECLTYPE_UBYTE4 | D3DDECLUSAGE_BLENDINDICES | 0 | D3DFVF_XYZB (nWeights+1) |
D3DDECLTYPE_FLOAT3 | D3DDECLUSAGE_NORMAL | 0 | D3DFVF_NORMAL |
D3DDECLTYPE_FLOAT1 | D3DDECLUSAGE_PSIZE | 0 | D3DFVF_PSIZE |
D3DDECLTYPE_D3DCOLOR | D3DDECLUSAGE_COLOR | 0 | D3DFVF_DIFFUSE |
D3DDECLTYPE_D3DCOLOR | D3DDECLUSAGE_COLOR | 1 | D3DFVF_SPECULAR |
D3DDECLTYPE_FLOATm | D3DDECLUSAGE_TEXCOORD | n | D3DFVF_TEXCOORDSIZEm (n) |
D3DDECLTYPE_FLOAT3 | D3DDECLUSAGE_POSITION | 1 | N/A |
D3DDECLTYPE_FLOAT3 | D3DDECLUSAGE_NORMAL | 1 | N/A |
相關主題