IDirect3DRMProgressiveMesh::Duplicate
Creates a copy of the Direct3DRMProgressiveMesh object. The copy shares all geometry and face data with the original, but has a detail level that can be set independently of the original. This enables the same mesh data to be used in different parts of the hierarchy but with different levels of detail. In essence, you almost have two instances of a progressive mesh within the frame hierarchy.
HRESULT Duplicate(
LPDIRECT3DRMPROGRESSIVEMESH* lplpD3DRMPMesh
)
Parameters
lplpD3DRMPMesh
Address of a Direct3DRMProgressiveMesh pointer that will be filled with a pointer to the newly generated Direct3DRMProgressiveMesh object.
Return Values
Returns DD_OK if successful, or one of the following errors:
D3DRMERR_CONNECTIONLOST
D3DRMERR_INVALIDOBJECT
D3DRMERR_INVALIDPARAMS
D3DRMERR_NOTENOUGHDATA
Remarks
The progressive mesh being duplicated must have at least its base mesh loaded. If you call this method on a progressive mesh that is currently being asynchronously loaded, the duplicated mesh only has as much detail as the loading progressive mesh had at the time it was duplicated. Any vertex splits loaded after the duplication are not available to the duplicated mesh.
A progressive mesh has a set of data representing the base mesh, and a set of data representing the vertex splits. The base mesh data and data describing the current state of the progressive mesh and the current level of detail isn't shared between meshes that are duplicated, but the vertex splits are. This method creates a new instance of the Progressive Mesh which shares all geometry and face data with the original, but has a detail level that can be set independently of the original.