mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-01-06 11:39:49 -06:00
Create BoolProperty for PerformanceComponent
This commit is contained in:
@@ -54,6 +54,7 @@ protected:
|
||||
|
||||
properties::BoolProperty _sceneGraphIsEnabled;
|
||||
properties::BoolProperty _functionsIsEnabled;
|
||||
properties::BoolProperty _outputLogs;
|
||||
};
|
||||
|
||||
} // namespace gui
|
||||
|
||||
@@ -59,11 +59,13 @@ GuiPerformanceComponent::GuiPerformanceComponent()
|
||||
, _sortingSelection("sortingSelection", "Sorting", -1, -1, 6)
|
||||
, _sceneGraphIsEnabled("showSceneGraph", "Show Scene Graph Measurements", false)
|
||||
, _functionsIsEnabled("showFunctions", "Show Function Measurements", false)
|
||||
, _outputLogs("outputLogs", "Output Logs", false)
|
||||
{
|
||||
addProperty(_sortingSelection);
|
||||
|
||||
addProperty(_sceneGraphIsEnabled);
|
||||
addProperty(_functionsIsEnabled);
|
||||
addProperty(_outputLogs);
|
||||
}
|
||||
|
||||
void GuiPerformanceComponent::render() {
|
||||
@@ -81,9 +83,10 @@ void GuiPerformanceComponent::render() {
|
||||
v = _functionsIsEnabled;
|
||||
ImGui::Checkbox("Functions", &v);
|
||||
_functionsIsEnabled = v;
|
||||
v = OsEng.renderEngine().performanceManager()->loggingEnabled();
|
||||
v = _outputLogs;
|
||||
ImGui::Checkbox("Output Logs", &v);
|
||||
OsEng.renderEngine().performanceManager()->setLogging(v);
|
||||
_outputLogs = v;
|
||||
|
||||
ImGui::Spacing();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user