Share via


D3DFVF_TEXCOORDSIZEn

This macro constructs bit patterns that are used to identify texture coordinate formats within a flexible vertex format description. The results of these macros can be combined within a flexible vertex format description by using the OR operator.

#define D3DFVF_TEXCOORDSIZE1(CoordIndex) (D3DFVF_TEXTUREFORMAT1 << \
                                                     (CoordIndex*2 + 16))
#define D3DFVF_TEXCOORDSIZE2(CoordIndex) (D3DFVF_TEXTUREFORMAT2)
#define D3DFVF_TEXCOORDSIZE3(CoordIndex) (D3DFVF_TEXTUREFORMAT3 << \
                                                     (CoordIndex*2 + 16))
#define D3DFVF_TEXCOORDSIZE4(CoordIndex) (D3DFVF_TEXTUREFORMAT4 << \
                                                     (CoordIndex*2 + 16))

Parameters

  • CoordIndex
    Value that identifies the texture coordinate set at which the texture coordinate size (1-, 2-, 3-, or 4-dimensional) applies.

Remarks

The D3DFVF_TEXCOORDSIZEn macros use the following constants:

#define D3DFVF_TEXTUREFORMAT1 3 // one floating point value
#define D3DFVF_TEXTUREFORMAT2 0 // two floating point values
#define D3DFVF_TEXTUREFORMAT3 1 // three floating point values
#define D3DFVF_TEXTUREFORMAT4 2 // four floating point values

The following flexible vertex format description identifies a vertex format that has a position; a normal; diffuse and specular colors; and two sets of texture coordinates. The first set of texture coordinates includes a single element, and the second set includes two elements.

DWORD dwFVF = D3DFVF_XYZ | D3DFVF_NORMAL | D3DFVF_DIFFUSE |
              D3DFVF_SPECULAR | D3DFVF_TEX2 |
              D3DFVF_TEXCOORDSIZE1(0) |  \\ Uses 1-D texture coordinates
for
                                         \\ texture coordinate set 1
(index 0).
              D3DFVF_TEXCOORDSIZE2(1);   \\ And 2-D texture coordinates
for 
                                         \\ texture coordinate set 2
(index 1).

Requirements

OS Versions: Windows CE .NET 4.0 and later.
Header: D3d8types.h.

See Also

Direct3D Macros | Direct3D Macros | Flexible Vertex Format Flags

 Last updated on Thursday, April 08, 2004

© 1992-2003 Microsoft Corporation. All rights reserved.