Stub for Performance Manager & GUI Button

This commit is contained in:
Matthew Territo
2017-07-03 13:46:17 -06:00
parent a65eba4d93
commit 81164e0d8d
3 changed files with 9 additions and 0 deletions

View File

@@ -58,6 +58,7 @@ public:
void storeIndividualPerformanceMeasurement(std::string identifier, long long nanoseconds);
void storeScenePerformanceMeasurements(const std::vector<SceneGraphNode*>& sceneNodes);
void outputLogs();
PerformanceLayout* performanceData();
private:

View File

@@ -87,6 +87,10 @@ void GuiPerformanceComponent::render() {
if (ImGui::Button("Reset measurements")) {
OsEng.renderEngine().performanceManager()->resetPerformanceMeasurements();
}
if (ImGui::Button("Output Logs")) {
OsEng.renderEngine().performanceManager()->outputLogs();
}
if (_sceneGraphIsEnabled) {
bool sge = _sceneGraphIsEnabled;

View File

@@ -196,6 +196,10 @@ bool PerformanceManager::isMeasuringPerformance() const {
return _doPerformanceMeasurements;
}
void PerformanceManager::outputLogs() {
for (size_t i = 0; i < 30; i++) LINFO("Outputting logs");
}
PerformanceLayout* PerformanceManager::performanceData() {
void* ptr = _performanceMemory->memory();
return reinterpret_cast<PerformanceLayout*>(ptr);