Syntax

Result = dbLoadMesh(Filename.s, MeshID)

Description

If #PB_Any is used as the MeshID parameter, the new ID will be returned as 'Result'. Otherwise the value of 'Result' is the same value passed as the MeshID parameter.

This command will load a single X file into the specified mesh number. A mesh is a wireframe description of a 3D shape. You must use a filename that points to a file that stores 3D mesh data in the X file format. The mesh number should be specified using an integer value. This command is almost a direct wrapper to the DirectX function 'D3DXLoadMeshFromX', and this function will not load all forms of X file. If you experience problems loading a mesh using this command, try the alternative method of:

dbLoadObject("mesh.x",1)
dbMakeMeshFromObject(1,1)
dbDeleteObject(1)

See Also

dbChangeMesh, dbDeleteObject, dbMakeMeshFromObject, dbMakeObject, dbMeshExist, dbReduceMesh, dbSaveObject