From b29509c8a9b760f51c0a17c07fba11c989fc0408 Mon Sep 17 00:00:00 2001 From: Sergey Yagovtsev Date: Fri, 4 Mar 2016 12:17:50 +0300 Subject: [PATCH] Add color for sample application --- sample/main.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/sample/main.cpp b/sample/main.cpp index c22bb0b..956bde4 100644 --- a/sample/main.cpp +++ b/sample/main.cpp @@ -5,40 +5,40 @@ #include void loadingResources(){ - PROFILER_BEGIN_FUNCTION_BLOCK; + PROFILER_BEGIN_FUNCTION_BLOCK_GROUPED(profiler::colors::Lightcyan); std::this_thread::sleep_for(std::chrono::milliseconds(500)); } void prepareMath(){ - PROFILER_BEGIN_FUNCTION_BLOCK; + PROFILER_BEGIN_FUNCTION_BLOCK_GROUPED(profiler::colors::Blue); std::this_thread::sleep_for(std::chrono::milliseconds(2)); } void calculateBehavior(){ - PROFILER_BEGIN_FUNCTION_BLOCK; + PROFILER_BEGIN_FUNCTION_BLOCK_GROUPED(profiler::colors::Lightblue); std::this_thread::sleep_for(std::chrono::milliseconds(3)); } void modellingStep(){ - PROFILER_BEGIN_FUNCTION_BLOCK; + PROFILER_BEGIN_FUNCTION_BLOCK_GROUPED(profiler::colors::Navy); prepareMath(); calculateBehavior(); std::this_thread::sleep_for(std::chrono::milliseconds(5)); } void prepareRender(){ - PROFILER_BEGIN_FUNCTION_BLOCK; + PROFILER_BEGIN_FUNCTION_BLOCK_GROUPED(profiler::colors::Lightred); std::this_thread::sleep_for(std::chrono::milliseconds(5)); } void calculatePhysics(){ - PROFILER_BEGIN_FUNCTION_BLOCK; + PROFILER_BEGIN_FUNCTION_BLOCK_GROUPED(profiler::colors::Red); std::this_thread::sleep_for(std::chrono::milliseconds(7)); } void frame(){ - PROFILER_BEGIN_FUNCTION_BLOCK; + PROFILER_BEGIN_FUNCTION_BLOCK_GROUPED(profiler::colors::Magenta); prepareRender(); calculatePhysics(); std::this_thread::sleep_for(std::chrono::milliseconds(4)); @@ -47,7 +47,7 @@ void frame(){ void loadingResourcesThread(){ for(int i = 0; i < 10; i++){ loadingResources(); - PROFILER_ADD_EVENT("Resources Loading!"); + PROFILER_ADD_EVENT_GROUPED("Resources Loading!",profiler::colors::Cyan); std::this_thread::sleep_for(std::chrono::milliseconds(2)); } }