[ Maverik Level 1 functions ]
mav_frameBegin
Summary
Starts a frame.
Syntax
void mav_frameBegin(void);
Description
Calling this function signifies the
start of a frame and causes the following actions to occur in order:
- 1. The polling function for each device, defined by mav_deviceNew, is called to calculate the device's position in its coordinate frame.
- 2. Any user-defined functions, set with mav_frameFn0Add, are executed.
- 3. Any user-defined functions, set with mav_frameFn1Add, are executed.
- 4. For each window, the framebuffer is cleared to its background
colour (set with mav_windowBackgroundColourSet) and the view is set
to the values defined by the view parameters associated with the
window (set with mav_windowViewParamsSet).
- 5. The function to calculate the position of each device in world coordinates is executed.
- 6. Any user-defined functions, set with mav_frameFn2Add, are executed.
The purpose of having three sets of user-defined functions is as
follows. Those set with mav_frameFn0Add or mav_frameFn1Add can not perform any
rendering, since the framebuffer will not have yet been cleared. However,
since the view has not yet been fixed, they can change the values of the
view parameters. mav_frameFn0Add functions are reserved for use
by the navigation routines. Applications should use mav_frameFn1Add
function if they want to manipulate the view paramaters, e.g. tying
the view in one window to related to another.
The opposite is true for user-defined functions set with
mav_frameFn2Add. They may perform rendering, but since the view has
been defined, changing the view parameters will have no effect until the
next frame. Furthermore, mav_frameFn0Add and mav_frameFn1Add
functions can only use the local coordinate frame position of any
device, whereas mav_frameFn2Add functions can use both local and
world coordinate frame positions.
See also
mav_frameEnd.html>mav_frameEnd, mav_deviceNew.html>mav_deviceNew, mav_frameFn0Add.html>mav_frameFn0Add,
mav_frameFn1Add.html>mav_frameFn1Add, mav_frameFn2Add.html>mav_frameFn2Add,
mav_windowBackgroundColourSet.html>mav_windowBackgroundColourSet, mav_windowViewParamsSet.html>mav_windowViewParamsSet.
Back to the index page.