VertexFormats Enumeration
.NET Framework 3.0
Describes values that define a vertex format used to describe the contents of vertices that are stored interleaved in a single data stream.
Assembly: Microsoft.WindowsMobile.DirectX (in microsoft.windowsmobile.directx.dll)
This enumeration has a FlagsAttribute attribute that allows a bitwise combination of its member values.
Namespace: Microsoft.WindowsMobile.DirectX.Direct3DAssembly: Microsoft.WindowsMobile.DirectX (in microsoft.windowsmobile.directx.dll)
| Member name | Description | |
|---|---|---|
![]() | Diffuse | Vertex format includes a diffuse color component. |
![]() | Normal | Vertex format includes a vertex normal vector. This value cannot be used with the Transformed flag. |
![]() | NormalFixed | Same as Normal, but for fixed-point math operations. |
![]() | NormalMask | Mask for normal bits. |
![]() | Position | Mask for position bits. |
![]() | PositionFixed | Same as Position, but for fixed-point math operations. |
![]() | PositionMask | Mask for position bits. |
![]() | PositionNormal | Vertex format includes a vertex normal vector. This value cannot be used with the Transformed value. |
![]() | PositionNormalFixed | Same as PositionNormal, but for fixed-point math operations. |
![]() | Specular | Vertex format includes a specular color component. |
![]() | Texture0 | No texture coordinate sets for this vertex. The values for these flags are not sequential. |
![]() | Texture1 | One texture coordinate set for this vertex. The values for these flags are not sequential. |
![]() | Texture2 | Two texture coordinate sets for this vertex. The values for these flags are not sequential. |
![]() | Texture3 | Three texture coordinate sets for this vertex. The values for these flags are not sequential. |
![]() | Texture4 | Four texture coordinate sets for this vertex. The values for these flags are not sequential. |
![]() | TextureCountMask | Mask value for texture flag bits. |
![]() | TextureCountShift | Number of bits by which to shift an integer value that identifies the number of texture coordinates for a vertex. |
![]() | Transformed | Mask value for texture flag bits. |
![]() | TransformedFixed | Same as Transformed, but for fixed-point math operations. |
Vertex format codes generally are used to specify data to be processed by fixed function vertex processing. You can use the VertexTextureCoordinate class to construct VertexFormats values.
The following example demonstrates how to use a VertexFormats enumeration.
VertexFormats fvf; // The vertex format code for a vertex with a position and one 2-D texture coordinate. fvf = VertexFormats.Position | VertexFormats.Texture1; // The vertex format code for a vertex with a position, a vertex normal vector, // and two 2-D texture coordinates. fvf = VertexFormats.Position | VertexFormats.Normal | VertexFormats.Texture2; // The vertex format code for a vertex with a position and two 1-D texture coordinates. fvf = VertexFormats.Position | VertexFormats.Texture2 | VertexTextureCoordinate.Size1(0) | VertexTextureCoordinate.Size1(1); // The vertex format code for a vertex with a position and two 1-D texture coordinates with fixed point data. fvf = VertexFormats.PositionFixed | VertexFormats.Texture2 | VertexTextureCoordinate.Size1(0) | VertexTextureCoordinate.Size1(1) | VertexTextureCoordinate.Fixed(0) | VertexTextureCoordinate.Fixed(1);
Community Additions
ADD
Show:
