Branimir Karadžić 8 년 전
부모
커밋
1f86df4c54
1개의 변경된 파일3개의 추가작업 그리고 7개의 파일을 삭제
  1. 3 7
      examples/common/example-glue.cpp

+ 3 - 7
examples/common/example-glue.cpp

@@ -196,13 +196,13 @@ void showExampleDialog(entry::AppI* _app, const char* _errorText)
 				ImVec4 gpuColor(0.5f, 0.5f, 1.0f, 1.0f);
 				ImVec4 gpuColor(0.5f, 0.5f, 1.0f, 1.0f);
 
 
 				const float itemHeight = ImGui::GetTextLineHeightWithSpacing();
 				const float itemHeight = ImGui::GetTextLineHeightWithSpacing();
+				const double toCpuMs = 1000.0/double(stats->cpuTimerFreq);
+				const double toGpuMs = 1000.0/double(stats->gpuTimerFreq);
+				const float  scale   = 3.0f;
 
 
 				if (ImGui::ListBoxHeader("Encoders", ImVec2(ImGui::GetWindowWidth(), stats->numEncoders*itemHeight) ) )
 				if (ImGui::ListBoxHeader("Encoders", ImVec2(ImGui::GetWindowWidth(), stats->numEncoders*itemHeight) ) )
 				{
 				{
 					ImGuiListClipper clipper(stats->numEncoders, itemHeight);
 					ImGuiListClipper clipper(stats->numEncoders, itemHeight);
-					const double toCpuMs = 1000.0/double(stats->cpuTimerFreq);
-					const double toGpuMs = 1000.0/double(stats->gpuTimerFreq);
-					const float  scale   = 3.0f;
 
 
 					while (clipper.Step() )
 					while (clipper.Step() )
 					{
 					{
@@ -239,10 +239,6 @@ void showExampleDialog(entry::AppI* _app, const char* _errorText)
 				{
 				{
 					ImGuiListClipper clipper(stats->numViews, itemHeight);
 					ImGuiListClipper clipper(stats->numViews, itemHeight);
 
 
-					const double toCpuMs = 1000.0/double(stats->cpuTimerFreq);
-					const double toGpuMs = 1000.0/double(stats->gpuTimerFreq);
-					const float  scale   = 3.0f;
-
 					while (clipper.Step() )
 					while (clipper.Step() )
 					{
 					{
 						for (int32_t pos = clipper.DisplayStart; pos < clipper.DisplayEnd; ++pos)
 						for (int32_t pos = clipper.DisplayStart; pos < clipper.DisplayEnd; ++pos)