PathEngine home previous: iTestBed::setColourRGB()next: iTestBed::setMeshAtSlot()
Contents, API Reference, Interfaces, iTestBed, setMesh

iTestBed::setMesh()

Description

Sets the testbed's current mesh.

Syntax

void setMesh(iMesh* mesh);
        

Parameters

mesh The mesh to set as current mesh.

Remarks

The testbed has a current mesh which can be set and released.
This mesh will be drawn by iTestBed::drawMesh() and so on.
Positions passed into the testbed must be positions on this mesh.

The current mesh can be released by calling setMesh() again with a null pointer for the mesh argument. (Or with a different mesh pointer.)
The mesh pointer must remain valid whilst set.

Mesh slots

Changing the current mesh has some cost, since render preprocess relating to the mesh is generated internally by the testbed.

In certain situations where the current mesh is changed quite frequently (for example when multiple meshes are being rendered each frame), a 'mesh slot' mechanism can be used to avoid testbed internal render preprocess being regenerated.

In this case, the current mesh in each slot can be set with iTestBed::setMeshAtSlot(), and the active slot set with iTestBed::setActiveMeshSlot(), without internal render preprocess being regenerated.

Calling setMesh() then actually sets the current mesh in slot 0 (the slot initially active on testbed startup), i.e. this is equivalent to calling setMeshAtSlot() with slot set to 0.


Documentation for PathEngine release 6.00 - Copyright © 2002-2016 PathEnginenext: iTestBed::setMeshAtSlot()