Blowbox 2017
A 3D Game Engine by Riko Ophorst using DirectX 12
Public Member Functions | Private Attributes | List of all members
blowbox::FrameStats Class Reference

#include <frame_stats.h>

Public Member Functions

void RenderMenu () override
 
void RenderWindow () override
 
void NewFrame ()
 

Private Attributes

float last_bounds_reset_time_
 
float bounds_reset_interval_
 
int history_sample_count_
 
bool show_window_
 
RingBuffer< float > delta_time_history_
 
float delta_time_history_contiguous_ [BLOWBOX_PROFILER_HISTORY_MAX_SAMPLE_COUNT]
 
float delta_times_upper_bound_
 
float delta_times_lower_bound_
 
float average_delta_time_
 
float fps_history_contiguous_ [BLOWBOX_PROFILER_HISTORY_MAX_SAMPLE_COUNT]
 
int view_frame_stats_as_fps_
 

Detailed Description

Provides an overview of frame statistics.

Provides a simple debug window with frame statistics in the main debug menu.

Inheritance diagram for blowbox::FrameStats:
blowbox::DebugWindow

Member Function Documentation

void blowbox::FrameStats::NewFrame ( )

Starts a new profiling frame.

void blowbox::FrameStats::RenderMenu ( )
overridevirtual

Renders the menu for the Profiler.

Implements blowbox::DebugWindow.

void blowbox::FrameStats::RenderWindow ( )
overridevirtual

Renders the actual window for the Profiler.

Implements blowbox::DebugWindow.

Member Data Documentation

float blowbox::FrameStats::average_delta_time_
private

The average delta time of the delta times inside of the current delta_time_history_.

float blowbox::FrameStats::bounds_reset_interval_
private

The interval at which bounds should be reset.

RingBuffer<float> blowbox::FrameStats::delta_time_history_
private

A history buffer for all delta times.

float blowbox::FrameStats::delta_time_history_contiguous_[BLOWBOX_PROFILER_HISTORY_MAX_SAMPLE_COUNT]
private

Stores the delta times from the delta_time_history_ contiguously in memory.

float blowbox::FrameStats::delta_times_lower_bound_
private

The lower bound of the delta times (i.e. the lowest delta time) that exist in the current delta_time_history_.

float blowbox::FrameStats::delta_times_upper_bound_
private

The upper bound of the delta times (i.e. the highest delta time) that exist in the current delta_time_history_.

float blowbox::FrameStats::fps_history_contiguous_[BLOWBOX_PROFILER_HISTORY_MAX_SAMPLE_COUNT]
private

Stores FPS values contiguously in memory.

int blowbox::FrameStats::history_sample_count_
private

The number of samples that should be kept as history for all history buffers.

float blowbox::FrameStats::last_bounds_reset_time_
private

The last time that bounds got reset in the profiler.

bool blowbox::FrameStats::show_window_
private

Whether the frame stats window should be shown.

int blowbox::FrameStats::view_frame_stats_as_fps_
private

Whether stats in the frame stats window should be shown as delta time or as FPS.


The documentation for this class was generated from the following files: