PathEngine home previous: Loading a meshnext: The finished application
Contents, Programmers Guide, Example Projects, Tutorials, A basic application, The update loop

The update loop

The test application runs as a main loop, and must call iTestBed::update() every frame so that the testbed can render the view and process user input.

For this tutorial we'll use a very basic update loop that exits when the escape key is pressed:

	testbed->setColourRGB(0.0f, 0.0f, 0.85f);

iTestBed::getKeyState() returns whether the key corresponding to the given string is currently down.
In this case, if the escape key is down then the loop terminates.
See Key Strings for a list of supported key strings.

Note that the currently selected mesh doesnt get drawn automatically.
We have to specifically ask for the mesh to be drawn.
iTestBed::drawMeshEdges() draws lines around the external edges of the mesh.
This makes it easier to see what is going when one part of the mesh occludes another.

There are string based and RGB based versions of the set colour function because the string based version is easier to read, but the RGB based version is more flexible.
See Colour Strings for a list of supported colour strings.

Camera control will be performed by the testbed within the call to iTestBed::update().

See Interface iTestBed. for a list of all functions provided by the testbed interface, together with reference.

Documentation for PathEngine release 6.00 - Copyright © 2002-2016 PathEnginenext: The finished application