From 2db430ca4f021f131af01e8e5896967cacb04190 Mon Sep 17 00:00:00 2001 From: id0x1234 Date: Thu, 14 Aug 2008 23:44:39 +0000 Subject: [PATCH] +Changed process/thread priority for more accurate benchmarking. +btDbvt benchmarking can be enable/run in main() --- Extras/CDTestFramework/CDTestFramework.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Extras/CDTestFramework/CDTestFramework.cpp b/Extras/CDTestFramework/CDTestFramework.cpp index 566530af2..4f810c9ca 100644 --- a/Extras/CDTestFramework/CDTestFramework.cpp +++ b/Extras/CDTestFramework/CDTestFramework.cpp @@ -26,6 +26,7 @@ subject to the following restrictions: #include "Terrain.h" #include "Camera.h" #include "GLFontRenderer.h" +#include "BulletCollision/BroadphaseCollision/btDbvt.h" #define NUM_SAP_BOXES 8192 @@ -224,6 +225,15 @@ static void Terminate() int main(int argc, char** argv) { + { + ::SetPriorityClass(::GetCurrentProcess(),HIGH_PRIORITY_CLASS); + ::SetThreadPriority(::GetCurrentThread(),THREAD_PRIORITY_TIME_CRITICAL); + #if 0 + btDbvt::benchmark(); + exit(0); + #endif + } + // Initialize AntTweakBar // (note that AntTweakBar could also be intialize after GLUT, no matter) if(!TwInit(TW_OPENGL, NULL))