?/TD>
Microsoft DirectX 9.0

D3DDECLTYPE Enumerated Type


Defines a vertex declaration data type.

Syntax

typedef enum _D3DDECLTYPE {
    D3DDECLTYPE_FLOAT1,
    D3DDECLTYPE_FLOAT2,
    D3DDECLTYPE_FLOAT3,
    D3DDECLTYPE_FLOAT4,
    D3DDECLTYPE_D3DCOLOR,
    D3DDECLTYPE_UBYTE4,
    D3DDECLTYPE_SHORT2,
    D3DDECLTYPE_SHORT4,
    D3DDECLTYPE_UBYTE4N,
    D3DDECLTYPE_SHORT2N,
    D3DDECLTYPE_SHORT4N,
    D3DDECLTYPE_USHORT2N,
    D3DDECLTYPE_USHORT4N,
    D3DDECLTYPE_UDEC3,
    D3DDECLTYPE_DEC3N,
    D3DDECLTYPE_FLOAT16_2,
    D3DDECLTYPE_FLOAT16_4,
    D3DDECLTYPE_UNUSED
} D3DDECLTYPE;

Constants

D3DDECLTYPE_FLOAT1

1-D float expanded to (float, 0, 0, 1).

D3DDECLTYPE_FLOAT2

2-D float expanded to (float, float, 0, 1).

D3DDECLTYPE_FLOAT3

3-D float expanded to (float, float, float, 1).

D3DDECLTYPE_FLOAT4

4-D float expanded to (float, float, float, float).

D3DDECLTYPE_D3DCOLOR

4-D packed unsigned bytes mapped to 0 to 1 range. Input is in D3DCOLOR format (ARGB) expanded to (R, G, B, A).

D3DDECLTYPE_UBYTE4

4-D unsigned byte.

D3DDECLTYPE_SHORT2

2-D signed short expanded to (value, value, 0, 1).

D3DDECLTYPE_SHORT4

4-D signed short expanded to (value, value, value, value).

D3DDECLTYPE_UBYTE4N

Each of 4 bytes is normalized by dividing to 255.0. This type is valid for vertex shader version 2.0 or higher.

D3DDECLTYPE_SHORT2N

Normalized, 2-D signed short, expanded to (First byte/32767.0, second byte/32767.0, 0, 1). This type is valid for vertex shader version 2.0 or higher.

D3DDECLTYPE_SHORT4N

Normalized, 4-D signed short, expanded to (First byte/32767.0, second byte/32767.0, third byte/32767.0, fourth byte/32767.0). This type is valid for vertex shader version 2.0 or higher.

D3DDECLTYPE_USHORT2N

Normalized, 2-D unsigned short, expanded to (First byte/65535.0, second byte/65535.0, 0, 1). This type is valid for vertex shader version 2.0 or higher.

D3DDECLTYPE_USHORT4N

Normalized 4-D unsigned short, expanded to (First byte/65535.0, second byte/65535.0, third byte/65535.0, fourth byte/65535.0). This type is valid for vertex shader version 2.0 or higher.

D3DDECLTYPE_UDEC3

3-D unsigned 10 10 10 format expanded to (value, value, value, 1).

D3DDECLTYPE_DEC3N

3-D signed 10 10 10 format normalized and expanded to (v[0]/511.0, v[1]/511.0, v[2]/511.0, 1).

D3DDECLTYPE_FLOAT16_2

Two 16-bit floating point values expanded to (value, value, 0, 1). This type is valid for vertex shader version 2.0 or higher.

D3DDECLTYPE_FLOAT16_4

Four 16-bit floating point values expanded to (value, value, value, value). This type is valid for vertex shader version 2.0 or higher.

D3DDECLTYPE_UNUSED

Type field in the declaration is unused. This is designed for use with D3DDECLMETHOD_UV and D3DDECLMETHOD_LOOKUPPRESAMPLED.

Remarks

Vertex data is declared with an array of D3DVERTEXELEMENT9 structures. Each element in the array contains a vertex declaration data type.

Enumerated Type Information

Headerd3d9types.h
Minimum operating systems Windows 98

See Also

D3DDECLMETHOD


© 2002 Microsoft Corporation. All rights reserved.