VertexFormats Enumeration
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
/** @attribute FlagsAttribute() */
public enum VertexFormats
FlagsAttribute
public enum VertexFormats
Members
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. |
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.
Example
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 Pocket PC, Windows Mobile for Smartphone
The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.
Version Information
.NET Compact Framework
Supported in: 2.0
See Also
Reference
Microsoft.WindowsMobile.DirectX.Direct3D Namespace