Microsoft DirectX 8.1 (Visual Basic) |
Defines bit patterns that are used to identify texture coordinate formats within a flexible vertex format description. The members of this enumeration can be combined within a flexible vertex format description by using the OR operator.
Enum CONST_D3DFVFTEXTUREFORMATS D3DFVF_TEXTUREFORMAT1 = 3 D3DFVF_TEXTUREFORMAT2 = 0 D3DFVF_TEXTUREFORMAT3 = 1 D3DFVF_TEXTUREFORMAT4 = 2 D3DFVF_TEXCOORDSIZE1_0 = 196608 (&H30000) D3DFVF_TEXCOORDSIZE1_1 = 786432 (&HC0000) D3DFVF_TEXCOORDSIZE1_2 = 3145728 (&H300000) D3DFVF_TEXCOORDSIZE1_3 = 12582912 (&HC00000) D3DFVF_TEXCOORDSIZE2_0 = 0 D3DFVF_TEXCOORDSIZE2_1 = 0 D3DFVF_TEXCOORDSIZE2_2 = 0 D3DFVF_TEXCOORDSIZE2_3 = 0 D3DFVF_TEXCOORDSIZE3_0 = 65536 (&H10000) D3DFVF_TEXCOORDSIZE3_1 = 262144 (&H40000) D3DFVF_TEXCOORDSIZE3_2 = 1048576 (&H100000) D3DFVF_TEXCOORDSIZE3_3 = 4194304 (&H400000) D3DFVF_TEXCOORDSIZE4_0 = 131072 (&H20000) D3DFVF_TEXCOORDSIZE4_1 = 524288 (&H80000) D3DFVF_TEXCOORDSIZE4_2 = 2097152 (&H200000) D3DFVF_TEXCOORDSIZE4_3 = 8388608 (&H800000) End Enum
D3DFVF_TEXTUREFORMAT1 to D3DFVF_TEXTUREFORMAT4 specify the number of values that define a texture coordinate set. The D3DFVF_TEXTUREFORMAT1 indicates one-dimensional texture coordinates, D3DFVF_TEXTUREFORMAT2 indicates two-dimensional texture coordinates, and so on. The following sample functions show you how to create bit patterns to describe the number of elements used by a particular set of texture coordinates.
'Equivalent to D3DFVF_TEXCOORDSIZE1_coordIndex, specifying that one 'texture coordinate is used for the vertex format specified by coordIndex Function D3DFVF_TEXCOORDSIZE1(coordIndex As Long) As Long D3DFVF_TEXCOORDSIZE1 = D3DFVF_TEXTUREFORMAT1 * 2 ^ ((coordIndex * 2) + 16) End Function 'Equivalent to D3DFVF_TEXCOORDSIZE1_coordIndex, specifying that two 'texture coordinates are used for the vertex format specified by coordIndex Function D3DFVF_TEXCOORDSIZE2(coordIndex As Long) As Long D3DFVF_TEXCOORDSIZE2 = D3DFVF_TEXTUREFORMAT2 End Function 'Equivalent to D3DFVF_TEXCOORDSIZE1_coordIndex, specifying that three 'texture coordinates are used for the vertex format specified by coordIndex Function D3DFVF_TEXCOORDSIZE3(coordIndex As Long) As Long D3DFVF_TEXCOORDSIZE3 = D3DFVF_TEXTUREFORMAT3 * 2 ^ ((coordIndex * 2) + 16) End Function 'Equivalent to D3DFVF_TEXCOORDSIZE1_coordIndex, specifying that four 'texture coordinate are used for the vertex format specified by coordIndex Function D3DFVF_TEXCOORDSIZE4(coordIndex As Long) As Long D3DFVF_TEXCOORDSIZE4 = D3DFVF_TEXTUREFORMAT4 * 2 ^ ((coordIndex * 2) + 16) End Function