Applications use the methods of the ID3DXFileSaveObject interface to write a .x file to disk, and to add and save data objects and templates.
Method | Description |
---|---|
ID3DXFileSaveObject::AddDataObject | Adds a data object as a child of the ID3DXFileSaveData object. |
ID3DXFileSaveObject::GetFile | Gets the ID3DXFile interface of the object that created this ID3DXFileSaveObject object. |
ID3DXFileSaveObject::Save | Saves a data object and its children to a .x file on disk. |
Templates are not required in every file. For example, you could put all templates into a single .x file rather than duplicating them in every .x file.
The ID3DXFileSaveObject interface is obtained by calling the ID3DXFile::CreateSaveObject method.
The globally unique identifier (GUID) for the ID3DXFileSaveObject interface is IID_ID3DXFileSaveObject.
The LPD3DXFILESAVEOBJECT type is defined as a pointer to this interface.
typedef interface ID3DXFileSaveObject *LPD3DXFILESAVEOBJECT;
Header: Declared in D3dx9xof.h.
Import Library: Use D3dx9.lib.