cgv
Loading...
Searching...
No Matches
cgv::render::gl::gl_performance_monitor Class Reference
Inheritance diagram for cgv::render::gl::gl_performance_monitor:
cgv::render::performance_monitor

Public Member Functions

 gl_performance_monitor ()
 construct performance monitor with standard configuration
 
void draw (cgv::render::context &ctx)
 draw with OpenGL
 
- Public Member Functions inherited from cgv::render::performance_monitor
 performance_monitor ()
 construct performance monitor with standard configuration
 
void set_file_name (const std::string &_file_name)
 
const std::string & get_file_name () const
 
void enable ()
 enable performance monitoring
 
void disable ()
 disable performance monitoring
 
bool is_enabled () const
 return whether performance monitoring is enabled
 
void init_tasks ()
 initialize the list of tasks to one for the frame and one for each default rendering pass
 
int add_task (const std::string &name, const rgb &col)
 add a new to me monitored item
 
unsigned get_buffer_size () const
 return the size of the buffer to store frame data
 
void start_frame ()
 start performance measurement of a new frame
 
unsigned get_frame_id () const
 return the current frame id
 
void start_task (int task_id)
 add a measurement for starting given task
 
void finish_task (int task_id)
 add a measurement for finishing given task
 
void finish_frame ()
 finish measurement of a frame, if this is not called by hand, it is called automatically in the next call to start_frame.
 
void clear_bar ()
 removes all items of the bar config and hides the bar
 
void add_bar_item (PerformanceMonitoringBar item)
 add a bar item to the bar config
 
void set_placement (const ibox2 &rectangle)
 place the performance monitor on screen in pixel coordinates
 
ibox2 get_placement () const
 return placement of performance monitor
 
void set_nr_display_cycles (unsigned _nr_cycles)
 set the number of display cycles to by drawn for the performance monitor
 
unsigned get_nr_display_cycles () const
 return the number of display cycles to by drawn for the performance monitor
 

Protected Member Functions

void draw_computed_bars (cgv::render::context &ctx, cgv::render::shader_program &prog)
 
void draw_bar (cgv::render::context &ctx, cgv::render::shader_program &prog, int y, const frame_data &fdata)
 
void draw_bars (cgv::render::context &ctx, cgv::render::shader_program &prog)
 
void draw_lines (cgv::render::context &ctx, cgv::render::shader_program &prog)
 
- Protected Member Functions inherited from cgv::render::performance_monitor
void compute_colors (const frame_data &fdata)
 
void compute_positions (int x, int y, int dx, int dy, const frame_data &fdata)
 
frame_data & current_frame ()
 
void add_measurement (const performance_measurement &pm)
 

Additional Inherited Members

- Public Types inherited from cgv::render::performance_monitor
typedef std::vector< performance_measurementframe_data
 
- Protected Attributes inherited from cgv::render::performance_monitor
bool enabled
 
double fps_alpha
 
double fps
 
ibox2 placement
 
int nr_display_cycles
 
int bar_line_width
 
rgb plot_color
 
std::string file_name
 
std::vector< performance_tasktasks
 
std::deque< frame_data > data
 
std::vector< PerformanceMonitoringBarbar_config
 
cgv::utils::stopwatch watch
 
float time_scale
 
std::vector< ivec2positions
 
std::vector< rgbcolors
 

Detailed Description

Definition at line 12 of file gl_performance_monitor.h.

Constructor & Destructor Documentation

◆ gl_performance_monitor()

cgv::render::gl::gl_performance_monitor::gl_performance_monitor ( )

construct performance monitor with standard configuration

Definition at line 10 of file gl_performance_monitor.cxx.

Member Function Documentation

◆ draw()

◆ draw_bar()

void cgv::render::gl::gl_performance_monitor::draw_bar ( cgv::render::context ctx,
cgv::render::shader_program prog,
int  y,
const frame_data &  fdata 
)
protected

Definition at line 88 of file gl_performance_monitor.cxx.

◆ draw_bars()

void cgv::render::gl::gl_performance_monitor::draw_bars ( cgv::render::context ctx,
cgv::render::shader_program prog 
)
protected

Definition at line 26 of file gl_performance_monitor.cxx.

◆ draw_computed_bars()

void cgv::render::gl::gl_performance_monitor::draw_computed_bars ( cgv::render::context ctx,
cgv::render::shader_program prog 
)
protected

Definition at line 13 of file gl_performance_monitor.cxx.

◆ draw_lines()

void cgv::render::gl::gl_performance_monitor::draw_lines ( cgv::render::context ctx,
cgv::render::shader_program prog 
)
protected

Definition at line 111 of file gl_performance_monitor.cxx.


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