]> git.mxchange.org Git - simgear.git/commitdiff
Refactor GLX only debug code
authorfredb <fredb>
Sun, 12 Jul 2009 17:48:49 +0000 (17:48 +0000)
committerTim Moore <timoore@redhat.com>
Wed, 15 Jul 2009 10:50:49 +0000 (12:50 +0200)
simgear/screen/RenderTexture.cpp

index 328dad1a61290e9be5d4841eafa4e8f25066645b..ee640a5c07526dd6aeb983a2aea68fb264a90916 100644 (file)
@@ -2798,11 +2798,17 @@ bool RenderTexture::_MakeCurrent()
         return false;
     }
 #else
+static GLXContext last_hGLContext = 0;
     if (false == glXMakeCurrent(_pDisplay, _hPBuffer, _hGLContext)) 
     {
         dbg_printf( "_MakeCurrent: glXMakeCurrent FAILED! returning false\n");
         return false;
     }
+
+    if ( last_hGLContext != _hGLContext ) {
+      last_hGLContext = _hGLContext;
+      dbg_printf( "_MakeCurrent: glXMakeCurrent set to [%p] SUCCESS! returning true\n", _hGLContext );
+    }
 #endif
     return true;
 }
@@ -3030,7 +3036,7 @@ bool RenderTexture::Reset(int iWidth, int iHeight)
     return true;
 }
 
-#ifdef _DEBUG
+#if defined( _DEBUG ) && !defined( _WIN32 ) && !defined( __MACH__ )
 /* just some DEBUG ONLY code, to show the 'attributes' */
 
 typedef struct tagPXATTS {