Partager via


MeshBuilder.CreateVertexChannel Generic Method

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

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

Syntax

public int CreateVertexChannel<T> (
         string usage
)

Type Parameters

  • T
    Type of the data channel.

Parameters

  • usage
    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

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

See Also

Reference

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

Platforms

Windows XP SP2, Windows Vista