VertexFormats Enumeration
[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]
Describes values that define a vertex format used to describe the contents of vertices that are stored interleaved in a single data stream.
This enumeration has a FlagsAttribute attribute that allows a bitwise combination of its member values.
Namespace: Microsoft.WindowsMobile.DirectX.Direct3D
Assembly: Microsoft.WindowsMobile.DirectX (in Microsoft.WindowsMobile.DirectX.dll)
Syntax
'Declaration
<FlagsAttribute> _
Public Enumeration VertexFormats
'Usage
Dim instance As VertexFormats
[FlagsAttribute]
public enum VertexFormats
[FlagsAttribute]
public enum class VertexFormats
[<FlagsAttribute>]
type VertexFormats
Members
Member name | Description | |
---|---|---|
Position | Mask for position bits. | |
PositionFixed | Same as Position, but for fixed-point math operations. | |
TransformedFixed | Same as Transformed, but for fixed-point math operations. | |
Transformed | Mask value for texture flag bits. | |
PositionMask | Mask for position bits. | |
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. | |
Diffuse | Vertex format includes a diffuse color component. | |
Specular | Vertex format includes a specular color component. | |
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. | |
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. | |
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. |
Remarks
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.
Examples
The following example demonstrates how to use a VertexFormats enumeration.
Dim fvf As VertexFormats
' The vertex format code for a vertex with a position and one 2-D texture coordinate.
fvf = VertexFormats.Position Or 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 Or VertexFormats.Normal Or VertexFormats.Texture2
' The vertex format code for a vertex with a position and two 1-D texture coordinates.
fvf = VertexFormats.Position Or VertexFormats.Texture2 Or VertexTextureCoordinate.Size1(0) Or 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 Or VertexFormats.Texture2 Or VertexTextureCoordinate.Size1(0) Or VertexTextureCoordinate.Size1(1) Or VertexTextureCoordinate.Fixed(0) Or VertexTextureCoordinate.Fixed(1)
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);
Platforms
Windows CE, Windows Mobile for Smartphone, Windows Mobile for Pocket PC
The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Version Information
.NET Compact Framework
Supported in: 3.5, 2.0
See Also
Reference
Microsoft.WindowsMobile.DirectX.Direct3D Namespace