Struct sixtyfps_corelib::graphics::FPSCounter
source · [−]pub struct FPSCounter { /* private fields */ }
Expand description
Helper class that rendering backends can use to provide an FPS counter
Implementations
Returns a new instance of the counter if requested by the user (via SIXTYFPS_DEBUG_PERFORMANCE
environment variable).
The environment variable holds a comma separated list of options:
* refresh_lazy
: selects the lazy refresh mode, where measurements are only taken when a frame is rendered (due to user input or animations)
* refresh_full_speed
: frames are continuously rendered
* console
: the measurement is printed to the console
* overlay
: the measurement is drawn as overlay on top of the scene
Call this function if you want to start measurements. This will also print out some system information such as whether this is a debug or release build, as well as the provided winsys_info string.
Call this function every time you’ve completed the rendering of a frame.