Microsoft DirectX 8.1 (Visual Basic)

D3DX8.LoadMeshFromXof

Loads a mesh from a Microsoft® DirectX® X file data object.

object.LoadMeshFromXof( _ 
    ofObjMesh As Unknown, _ 
    Options As Long, _ 
    Device As Direct3DDevice8, _ 
    RetBufAdjacency As D3DXBuffer, _ 
    RetMaterials As D3DXBuffer, _ 
    RetMaterialCount As Long) As D3DXMesh

Parts

object
Object expression that resolves to a D3DX8 object.
ofObjMesh
DirectXFileData object representing the DirectX file data object to load.
Options
A combination of one or more flags defined by the CONST_D3DXMESH enumeration, specifying creation options for the mesh.
Device
Direct3DDevice8 object, the device object associated with the mesh.
RetBufAdjacency
D3DXBuffer object. When the method returns, this parameter is filled with an array of three Long values per face that specify the three neighbors for each face in the mesh.
RetMaterials
D3DXBuffer object. When this method returns, this parameter is filled with an array of D3DXMATERIAL types, containing information saved in the DirectX file.
RetMaterialCount
Number of D3DXMATERIAL types in the RetMaterials array, when the method returns.

Return Values

D3DXMesh object representing the loaded mesh.

Error Codes

If the method fails, an error is raised and Err.Number can be set to one of the following values.

D3DERR_INVALIDCALL
D3DXERR_INVALIDDATA
E_OUTOFMEMORY

For information on trapping errors, see the Microsoft Visual Basic® Error Handling topic.

See Also

DirectXFileData