MeshBuilder.CreateVertexChannel Generic Method

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.

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

public int CreateVertexChannel<T> (
         string usage

Type Parameters

Type of the data channel.


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

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

Windows 7, Windows Vista, Windows XP

Community Additions