Refactor GLX only debug code

This commit is contained in:
fredb
2009-07-15 12:50:49 +02:00
committed by Tim Moore
parent a05e063949
commit f8e475cd34
+7 -1
View File
@@ -2798,11 +2798,17 @@ bool RenderTexture::_MakeCurrent()
return false; return false;
} }
#else #else
static GLXContext last_hGLContext = 0;
if (false == glXMakeCurrent(_pDisplay, _hPBuffer, _hGLContext)) if (false == glXMakeCurrent(_pDisplay, _hPBuffer, _hGLContext))
{ {
dbg_printf( "_MakeCurrent: glXMakeCurrent FAILED! returning false\n"); dbg_printf( "_MakeCurrent: glXMakeCurrent FAILED! returning false\n");
return false; return false;
} }
if ( last_hGLContext != _hGLContext ) {
last_hGLContext = _hGLContext;
dbg_printf( "_MakeCurrent: glXMakeCurrent set to [%p] SUCCESS! returning true\n", _hGLContext );
}
#endif #endif
return true; return true;
} }
@@ -3030,7 +3036,7 @@ bool RenderTexture::Reset(int iWidth, int iHeight)
return true; return true;
} }
#ifdef _DEBUG #if defined( _DEBUG ) && !defined( _WIN32 ) && !defined( __MACH__ )
/* just some DEBUG ONLY code, to show the 'attributes' */ /* just some DEBUG ONLY code, to show the 'attributes' */
typedef struct tagPXATTS { typedef struct tagPXATTS {