Поделиться через


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
Supported by the .NET Compact Framework Position Mask for position bits.
Supported by the .NET Compact Framework PositionFixed Same as Position, but for fixed-point math operations.
Supported by the .NET Compact Framework TransformedFixed Same as Transformed, but for fixed-point math operations.
Supported by the .NET Compact Framework Transformed Mask value for texture flag bits.
Supported by the .NET Compact Framework PositionMask Mask for position bits.
Supported by the .NET Compact Framework Normal Vertex format includes a vertex normal vector. This value cannot be used with the Transformed flag.
Supported by the .NET Compact Framework NormalFixed Same as Normal, but for fixed-point math operations.
Supported by the .NET Compact Framework NormalMask Mask for normal bits.
Supported by the .NET Compact Framework Diffuse Vertex format includes a diffuse color component.
Supported by the .NET Compact Framework Specular Vertex format includes a specular color component.
Supported by the .NET Compact Framework TextureCountMask Mask value for texture flag bits.
Supported by the .NET Compact Framework TextureCountShift Number of bits by which to shift an integer value that identifies the number of texture coordinates for a vertex.
Supported by the .NET Compact Framework Texture0 No texture coordinate sets for this vertex. The values for these flags are not sequential.
Supported by the .NET Compact Framework Texture1 One texture coordinate set for this vertex. The values for these flags are not sequential.
Supported by the .NET Compact Framework Texture2 Two texture coordinate sets for this vertex. The values for these flags are not sequential.
Supported by the .NET Compact Framework Texture3 Three texture coordinate sets for this vertex. The values for these flags are not sequential.
Supported by the .NET Compact Framework Texture4 Four texture coordinate sets for this vertex. The values for these flags are not sequential.
Supported by the .NET Compact Framework PositionNormal Vertex format includes a vertex normal vector. This value cannot be used with the Transformed value.
Supported by the .NET Compact Framework 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

Other Resources

Mobile Direct3D Programming in the .NET Compact Framework