Partager via


MeshBuilder.SetVertexChannelData Method

Sets the specified vertex data with new data.

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

Syntax

public void SetVertexChannelData (
         int vertexDataIndex,
         Object channelData
)

Parameters

  • vertexDataIndex
    Index of the vertex data channel being set. This should match the index returned by CreateVertexChannel.
  • channelData
    New data values for the vertex data. The data type being set must match the data type for the vertex channel specified by vertexDataIndex.

Remarks

The following table lists the exceptions that can be thrown by this method:

Exception Cause
KeyNotFoundException If vertexDataIndex does not correspond to an actual vertex data channel created using CreateVertexChannel.
InvalidOperationException If the type of channelData does not match the data type for the vertex channel specified by vertexDataIndex.

See Also

Reference

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

Platforms

Windows XP SP2, Windows Vista