DarkBASIC Professional Help File

DX11 LOAD OBJECT

Loads a 3D object from a file.
When importing the object, any encountered vertex data that is not represented in the vertex layout will be ignored.
If the layout describes vertex data that can not be read from the file [WELL, SOME ERROR LOG SHOULD PROBABLY BE KEPT FOR THAT], all such data elements
will be set to 0 in the created vertex buffer.
The following object formats are supported:

- Wavefront OBJ (*.obj)
- DirectX (*.x)
- Collada DAE (*.dae)
- Blender 3D (*.blend)
- 3DS Max 3DS (*.3ds)
- 3DS Max ASE (*.ase)
- Lightwave Object (*.lwo)
- Lightwave Scene (*.lws)
- MilkShape 3D (*.ms3d)
- BlitzBasic 3D (*.b3d)
- Terragen Terrain (*.ter)
- 3D Game Studio Scene (*.mdl)
- 3D Game Studio Terrain (*.hmp)
- Quake 1 Mesh (*.md1)
- Quake 2 Mesh (*.md2)
- Quake 3 Mesh (*.md3)
- Quake 3 Map (*.pk3)
- Object File Format (*.off)

Note that there may be issues importing certain formats.
Please let me know if you notice any problems importing an object file.

Syntax

    Return Dword = DX11 LOAD OBJECT(fileName, [vertLayout])

Parameters

    fileName

> String
> The name of the file to load the object from.

    [Optional] vertLayout

> Dword
> The vertex layout the loaded object's vertex data is supposed to match once imported. Will use a default one (POSITION/COLOR/NORMAL/TEXCOORD) if omitted.

Returns

The loaded object.

See also

OBJECT Functions Menu
DX11 Function Categories