show-scene-graph-analyzer-meter

This commit is contained in:
rdb 2009-06-12 08:33:48 +00:00
parent 83938771a1
commit 50c1eb00e7
4 changed files with 13 additions and 0 deletions

View File

@ -30,6 +30,8 @@ ConfigVariableDouble aspect_ratio
("aspect-ratio", 0.0); ("aspect-ratio", 0.0);
ConfigVariableBool show_frame_rate_meter ConfigVariableBool show_frame_rate_meter
("show-frame-rate-meter", false); ("show-frame-rate-meter", false);
ConfigVariableBool show_scene_graph_analyzer_meter
("show-scene-graph-analyzer-meter", false);
ConfigVariableString window_type ConfigVariableString window_type
("window-type", "onscreen"); ("window-type", "onscreen");

View File

@ -27,6 +27,7 @@ NotifyCategoryDecl(framework, EXPCL_FRAMEWORK, EXPTP_FRAMEWORK);
// Configure variables for framework package. // Configure variables for framework package.
extern ConfigVariableDouble aspect_ratio; extern ConfigVariableDouble aspect_ratio;
extern ConfigVariableBool show_frame_rate_meter; extern ConfigVariableBool show_frame_rate_meter;
extern ConfigVariableBool show_scene_graph_analyzer_meter;
extern ConfigVariableString record_session; extern ConfigVariableString record_session;
extern ConfigVariableString playback_session; extern ConfigVariableString playback_session;

View File

@ -184,6 +184,10 @@ open_window(const WindowProperties &props, int flags, GraphicsEngine *engine,
_frame_rate_meter = new FrameRateMeter("frame_rate_meter"); _frame_rate_meter = new FrameRateMeter("frame_rate_meter");
_frame_rate_meter->setup_window(_window); _frame_rate_meter->setup_window(_window);
} }
if (show_scene_graph_analyzer_meter) {
_scene_graph_analyzer_meter = new SceneGraphAnalyzerMeter("scene_graph_analyzer_meter", get_render().node());
_scene_graph_analyzer_meter->setup_window(_window);
}
} }
return _window; return _window;
@ -220,6 +224,10 @@ close_window() {
_frame_rate_meter->clear_window(); _frame_rate_meter->clear_window();
_frame_rate_meter = (FrameRateMeter *)NULL; _frame_rate_meter = (FrameRateMeter *)NULL;
} }
if (_scene_graph_analyzer_meter != (SceneGraphAnalyzerMeter *)NULL) {
_scene_graph_analyzer_meter->clear_window();
_scene_graph_analyzer_meter = (SceneGraphAnalyzerMeter *)NULL;
}
} }
//////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////

View File

@ -24,6 +24,7 @@
#include "trackball.h" #include "trackball.h"
#include "filename.h" #include "filename.h"
#include "frameRateMeter.h" #include "frameRateMeter.h"
#include "sceneGraphAnalyzerMeter.h"
#include "pointerTo.h" #include "pointerTo.h"
#include "partGroup.h" #include "partGroup.h"
#include "pvector.h" #include "pvector.h"
@ -197,6 +198,7 @@ private:
bool _perpixel_enabled; bool _perpixel_enabled;
PT(FrameRateMeter) _frame_rate_meter; PT(FrameRateMeter) _frame_rate_meter;
PT(SceneGraphAnalyzerMeter) _scene_graph_analyzer_meter;
BackgroundType _background_type; BackgroundType _background_type;