Applications use the methods of the ID3DXFileSaveObject interface to write a .x file to disk, and to add and save data objects and templates.
The ID3DXFileSaveObject interface inherits from the IUnknown interface. ID3DXFileSaveObject also has these types of members:
The ID3DXFileSaveObject interface has these methods.
|AddDataObject||Adds a data object as a child of the ID3DXFileSaveData object.
|GetFile||Gets the ID3DXFile interface of the object that created this ID3DXFileSaveObject object.
|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;