From 4cbf58f8eaf06bbd20ee6f638abf9522810304ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lubo=C5=A1=20Lu=C5=88=C3=A1k?= Date: Sun, 8 Oct 2006 20:30:02 +0000 Subject: [PATCH] Small fixes. svn path=/branches/work/kwin_composite/; revision=593721 --- scene_opengl.cpp | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/scene_opengl.cpp b/scene_opengl.cpp index 95e50a7956..8e1e41853f 100644 --- a/scene_opengl.cpp +++ b/scene_opengl.cpp @@ -151,8 +151,7 @@ bool SceneOpenGL::findConfig( const int* attrs, GLXFBConfig& config ) XFree( fbconfigs ); return true; } - static const int empty[] = { None }; - fbconfigs = glXChooseFBConfig( display(), DefaultScreen( display()), empty, &cnt ); + fbconfigs = glXGetFBConfigs( display(), DefaultScreen( display()), &cnt ); for( int i = 0; i < cnt; ++i ) @@ -164,13 +163,16 @@ bool SceneOpenGL::findConfig( const int* attrs, GLXFBConfig& config ) int value; if( glXGetFBConfigAttrib( display(), fbconfigs[ i ], attrs[ pos ], &value ) == Success ) - kDebug() << "ATTR:" << attrs[ pos ] << ":" << value - << ":" << attrs[ pos + 1 ] << endl; + kDebug() << "ATTR: 0x" << QString::number( attrs[ pos ], 16 ) + << ": 0x" << QString::number( attrs[ pos + 1 ], 16 ) + << ": 0x" << QString::number( value, 16 ) << endl; else - kDebug() << "ATTR FAIL:" << attrs[ pos ] << endl; + kDebug() << "ATTR FAIL: 0x" << QString::number( attrs[ pos ], 16 ) << endl; pos += 2; } } + if( fbconfigs != NULL ) + XFree( fbconfigs ); return false; } @@ -324,6 +326,7 @@ void SceneOpenGL::Window::bindTexture() XFillRectangle( display(), pix, gc, 0, th, c->width(), c->height() - th ); XFillRectangle( display(), pix, gc, tw, 0, c->width() - tw, c->height()); XFreeGC( display(), gc ); + glXWaitX(); } if( tfp_mode ) {