Microsoft DirectX 8.1 (Visual Basic) |
Saves a mesh to a Microsoft® DirectX® X file.
object.SaveMeshToX( _ FileName As String, _ Mesh As D3DXMesh, _ AdjacencyArray As Any, _ MaterialArray As D3DXMATERIAL, _ MaterialCount As Long, _ xFormat As Long)
If the method fails, an error is raised and Err.Number can be set to D3DERR_INVALIDCALL.
For information on trapping errors, see the Microsoft® Visual Basic® Error Handling topic.
The default value for the file format is DXFILEFORMAT_BINARY. The file format values can be combined together in a logical OR to create compressed text or compressed binary files. If a file is specified as both binary (0) and text (1), it is saved as a text file because the value is indistinguishable from the text file format value (0 + 1 = 1). If you indicate that the file format should be text and compressed, the file is first written out as text and then compressed. However, compressed text files are not as efficient as binary text files, so in most cases you indicate binary and compressed. Setting a file to be compressed without specifying a format results in a binary, compressed file.