mav_frameEnd(3)

NAME
mav_frameEnd - indicates the end of a frame.

LEVEL
Maverik Level 1

SYNTAX
void mav_frameEnd(void);

DESCRIPTION
Calling this function signifies the end of a frame and causes any user-defined functions, set with mav_frameFn3Add, to be executed. It then swaps the framebuffers, for all windows in double-buffered configurations, and executes any functions set with mav_frameFn4Add.

This function also calculates the wallclock time elapsed between calling mav_frameBegin and when the buffers have been swapping by this function. The reciprocal of this value, the frame-rate, is stored in the global variable mav_fps.

For high frame rates (short elapsed time) this value will inevitably fluctuate from frame to frame due to variations in system load and the resolution and inaccuracies of the internal clock. The global variable mav_fps_avg gives the frame rate averaged over the last second and does not suffer from these problems.

Any rendering that occurs after this function is called, and before the next call to mav_frameBegin, will be lost.

SEE ALSO
@mav_frameBegin, @mav_frameFn3Add, @mav_frameFn4Add.