ID3DX10Mesh::CommitToDevice method

Commit any changes made to a mesh to the device so that the changes can be rendered. This should be called after a mesh's data is altered and before it is rendered. A mesh cannot be rendered unless it is committed to the device. See remarks.

Syntax

HRESULT CommitToDevice();

Parameters

This method has no parameters.

Return value

Type: HRESULT

The return value is one of the values listed in Direct3D 10 Return Codes.

Remarks

When a mesh is loaded, it's data is loaded into staging resources, meaning the data can be altered but not rendered. When CommitToDevice is called, the data from the staging resources are copied into device resources so that they can be rendered. Although the data is committed to the device, the staging resources remain and can be modified. If any modifications are made to the staging resources, the staging resources must be committed to the device again in order for those changes to be rendered on screen.

Requirements

Requirement Value
Header
D3DX10.h
Library
D3DX10.lib

See also

ID3DX10Mesh

D3DX Interfaces