MeshBuilder.CreateVertexChannel Generic Method

Note

This generic method is available only when developing for Windows.

Creates a vertex data channel for use by the mesh. Typically, the data channel holds texture coordinates, normals, and other per-vertex data.

Syntax

'Declaration
Public Function CreateVertexChannel(Of T) ( _
         usage As String _
) As Integer 
public int CreateVertexChannel<T> (
         string usage
)
public:
generic<typename T>
int CreateVertexChannel(
         String usage
)

Type Parameters

  • T
    Type of the data channel.

Parameters

  • usage
    Type: String

    Describes how the channel is used. Use this parameter as a look-up into a VertexChannelCollection. It is strongly recommended that you choose a usage from the following list.

    • Binormal
    • Color
    • Normal
    • Tangent
    • TextureCoordinate
    • Weights

    For more information, see VertexChannelNames.

Return Value

Type: Int32
Index identifying the new data channel. Use this as a parameter when calling SetVertexChannelData.

Requirements

Namespace: Microsoft.Xna.Framework.Content.Pipeline.Graphics

Assembly: Microsoft.Xna.Framework.Content.Pipeline (in microsoft.xna.framework.content.pipeline.dll)

See Also

Reference

MeshBuilder Class
MeshBuilder Members
Microsoft.Xna.Framework.Content.Pipeline.Graphics Namespace

Platforms

Windows 7, Windows Vista, Windows XP