Click to See Complete Forum and Search --> : Direct3DRM


May 3rd, 1999, 02:53 PM
Hello. I have a regular MFC MDI application using DirectX 6.1. It loads a mesh from .x file into an IDirect3DRMMeshBuilder2 object. The view class then displays the mesh. The view can then rotate the mesh around any axis or zoom in or out along the z-axis. I have one problem, I want the program also to save the mesh back to a file. I override OnSaveDocument() in my document class and called IDirect3DRMMeshBuilder2::Save() as follows:


BOOL CMeshDoc::OnSaveDocument(LPCTSTR lpszPathName)
{
// Save the mesh to a file.
m_pMeshBuilder->Save(lpszPathName, D3DRMXOF_BINARY, D3DRMXOFSAVE_ALL | D3DRMXOFSAVE_TEXTURETOPOLOGY);

return TRUE;
}




but the mesh never saves. Can anyone tell me why this doesn't work and how to fix it.

Thanks,
BGjr