?/TD>
Microsoft DirectX 9.0

ID3DXBaseMesh::UpdateSemantics Method


This method 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.

Syntax

HRESULT UpdateSemantics(      

    D3DVERTEXELEMENT9 Declaration[MAX_FVF_DECL_SIZE] );

Parameters

Declaration
[in, out] An array of D3DVERTEXELEMENT9 elements, describing the vertex format of the mesh vertices. The upper limit of this declarator array is MAX_FVF_DECL_SIZE.

Return Value

If the method succeeds, the return value is D3D_OK.

If the method fails, the return value can be D3DERR_INVALIDCALL.



Remarks

ID3DXBaseMesh::CloneMesh is used to reformat and change the vertex data layout. For example, use it to to add space for normals, texture coordinates, colors, weights, etc. that were not present before.

ID3DXBaseMesh::UpdateSemantics is a method for updating the vertex declaration with different semantic information, without changing the layout of the vertex buffer. For example, use it to relabel a 3-D texture coordinate as a binormal or tangent, or vice versa.

See Also

ID3DXBaseMesh::CloneMeshFVF, ID3DXBaseMesh::CloneMesh, ID3DXBaseMesh::GetDeclaration, ID3DXMesh::GetDeclaration, ID3DXPMesh::GetDeclaration, D3DXDeclaratorFromFVF


© 2002 Microsoft Corporation. All rights reserved.