Share via


BaseMesh.UpdateSemantics(GraphicsStream) Method (Microsoft.DirectX.Direct3D)

Allows the user to change the mesh declaration without changing the data layout of the vertex buffer.

The call is valid only if the old and new declaration formats have the same vertex size.

Definition

Visual Basic Public Sub UpdateSemantics( _
    ByVal declaration As GraphicsStream _
)
C# public void UpdateSemantics(
    GraphicsStream declaration
);
C++ public:
void UpdateSemantics(
    GraphicsStreamdeclaration
);
JScript public function UpdateSemantics(
    declaration : GraphicsStream
);

Parameters

declaration Microsoft.DirectX.GraphicsStream
A GraphicsStream containing VertexElement structures that describe the vertex format of the mesh vertices.

Remarks

The BaseMesh.Clone method is used to reformat and change the vertex data layout. For example, it can be used to add space for new normals, texture coordinates, colors, and weights that were not present before.

The BaseMesh.UpdateSemantics method updates the vertex declaration with new semantic information without changing the layout of the vertex buffer. For example, it can be used to re-label a 3-D texture coordinate as a binormal or a tangent, or vice versa.

Exceptions

InvalidCallException

The method call is invalid. For example, a method's parameter might contain an invalid value.

Applies To

Mesh, ProgressiveMesh