0024230: TKOpenGl - request debug context by default in debug mode
authorkgv <kgv@opencascade.com>
Tue, 8 Oct 2013 13:04:22 +0000 (17:04 +0400)
committerbugmaster <bugmaster@opencascade.com>
Thu, 10 Oct 2013 10:33:05 +0000 (14:33 +0400)
Enable GL_DEBUG_OUTPUT_SYNCHRONOUS_ARB only for debug builds.

src/OpenGl/OpenGl_Caps.cxx
src/OpenGl/OpenGl_Context.cxx

index e5b3c99ae4cab1aea118b6ca0902738bac37428a..39c14a818a1a9590313f69723c9fbeb5a0e78cd6 100644 (file)
@@ -30,7 +30,11 @@ OpenGl_Caps::OpenGl_Caps()
 : vboDisable        (Standard_False),
   pntSpritesDisable (Standard_False),
   contextStereo     (Standard_False),
+#ifdef DEB
+  contextDebug      (Standard_True),
+#else
   contextDebug      (Standard_False),
+#endif
   contextNoAccel    (Standard_False)
 {
   //
index 765f9bc839a631c997a82bd91a850ab934599d17..a26f48287661749d9785f6419040ea0c46e6daea 100644 (file)
@@ -634,7 +634,9 @@ void OpenGl_Context::init()
     {
       // setup default callback
       arbDbg->glDebugMessageCallbackARB (debugCallbackWrap, this);
+    #ifdef DEB
       glEnable (GL_DEBUG_OUTPUT_SYNCHRONOUS_ARB);
+    #endif
     }
   }