cgv
|
Public Member Functions | |
gl_performance_monitor () | |
construct performance monitor with standard configuration | |
void | draw (cgv::render::context &ctx) |
draw with OpenGL | |
![]() | |
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) |
![]() | |
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 | |
![]() | |
typedef std::vector< performance_measurement > | frame_data |
![]() | |
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_task > | tasks |
std::deque< frame_data > | data |
std::vector< PerformanceMonitoringBar > | bar_config |
cgv::utils::stopwatch | watch |
float | time_scale |
std::vector< ivec2 > | positions |
std::vector< rgb > | colors |
Definition at line 12 of file gl_performance_monitor.h.
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.
void cgv::render::gl::gl_performance_monitor::draw | ( | cgv::render::context & | ctx | ) |
draw with OpenGL
Definition at line 150 of file gl_performance_monitor.cxx.
References cgv::render::shader_program::disable(), cgv::render::attribute_array_binding::disable_global_array(), cgv::render::shader_program::enable(), cgv::render::attribute_array_binding::enable_global_array(), cgv::render::context::pop_pixel_coords(), cgv::render::context::push_pixel_coords(), and cgv::render::context::ref_default_shader_program().
|
protected |
Definition at line 88 of file gl_performance_monitor.cxx.
|
protected |
Definition at line 26 of file gl_performance_monitor.cxx.
|
protected |
Definition at line 13 of file gl_performance_monitor.cxx.
|
protected |
Definition at line 111 of file gl_performance_monitor.cxx.