From 576a3aab8b273f047cca2190128ea46121e7782d Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Thu, 13 Nov 2003 18:02:00 +0000 Subject: [PATCH] log X screen and GLX vendor info --- stepmania/src/RageDisplay_OGL.cpp | 40 +++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/stepmania/src/RageDisplay_OGL.cpp b/stepmania/src/RageDisplay_OGL.cpp index 18b98abff4..908b7da33b 100644 --- a/stepmania/src/RageDisplay_OGL.cpp +++ b/stepmania/src/RageDisplay_OGL.cpp @@ -301,6 +301,44 @@ static void FlushGLErrors() ; } +#if defined(__unix__) && !defined(unix) +#define unix +#endif + +#if defined(unix) +#define Font X11___Font +#define Screen X11___Screen +#include "GL/glx.h" +#undef Font +#undef Screen +#endif + +static void LogGLXDebugInformation() +{ +#if defined(unix) + CHECKPOINT; + SDL_SysWMinfo info; + SDL_VERSION(&info.version); + if ( SDL_GetWMInfo(&info) < 0 ) + { + LOG->Warn("SDL_GetWMInfo failed: %s", SDL_GetError()); + return; + } + + Display *disp = info.info.x11.display; + ASSERT( disp ); + + const int scr = DefaultScreen( disp ); + + LOG->Info( "Display: %s", DisplayString(disp) ); + LOG->Info( "Screen: %i", scr ); + LOG->Info( "Server GLX vendor: %s", glXQueryServerString( disp, scr, GLX_VENDOR ) ); + LOG->Info( "Server GLX version: %s", glXQueryServerString( disp, scr, GLX_VERSION ) ); + LOG->Info( "Client GLX vendor: %s", glXGetClientString( disp, GLX_VENDOR ) ); + LOG->Info( "Client GLX version: %s", glXGetClientString( disp, GLX_VERSION ) ); +#endif +} + RageDisplay_OGL::RageDisplay_OGL( VideoModeParams p, bool bAllowUnacceleratedRenderer ) { LOG->Trace( "RageDisplay_OGL::RageDisplay_OGL()" ); @@ -326,6 +364,8 @@ RageDisplay_OGL::RageDisplay_OGL( VideoModeParams p, bool bAllowUnacceleratedRen LOG->Info("OGL Extensions: %s", glGetString(GL_EXTENSIONS)); LOG->Info("OGL Max texture size: %i", GetMaxTextureSize() ); + LogGLXDebugInformation(); + if( IsSoftwareRenderer() ) { if( !bAllowUnacceleratedRenderer )