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, or when the window is closed:

bool windowClosed = false;
while(!testBed->getKeyState("_ESCAPE") && !windowClosed)
{
    //...
}

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.

The cMeshRenderGeometry class, defined in "sampleShared/MeshRenderGeometry.h", is used for creating the appropriate 'render geometry' for rendering the mesh through iTestBed.

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.04 - Copyright © 2002-2024 PathEnginenext: The finished application