Small fixes.

svn path=/branches/work/kwin_composite/; revision=593721
This commit is contained in:
Luboš Luňák 2006-10-08 20:30:02 +00:00
parent d181233072
commit 4cbf58f8ea

View file

@ -151,8 +151,7 @@ bool SceneOpenGL::findConfig( const int* attrs, GLXFBConfig& config )
XFree( fbconfigs ); XFree( fbconfigs );
return true; return true;
} }
static const int empty[] = { None }; fbconfigs = glXGetFBConfigs( display(), DefaultScreen( display()), &cnt );
fbconfigs = glXChooseFBConfig( display(), DefaultScreen( display()), empty, &cnt );
for( int i = 0; for( int i = 0;
i < cnt; i < cnt;
++i ) ++i )
@ -164,13 +163,16 @@ bool SceneOpenGL::findConfig( const int* attrs, GLXFBConfig& config )
int value; int value;
if( glXGetFBConfigAttrib( display(), fbconfigs[ i ], attrs[ pos ], &value ) if( glXGetFBConfigAttrib( display(), fbconfigs[ i ], attrs[ pos ], &value )
== Success ) == Success )
kDebug() << "ATTR:" << attrs[ pos ] << ":" << value kDebug() << "ATTR: 0x" << QString::number( attrs[ pos ], 16 )
<< ":" << attrs[ pos + 1 ] << endl; << ": 0x" << QString::number( attrs[ pos + 1 ], 16 )
<< ": 0x" << QString::number( value, 16 ) << endl;
else else
kDebug() << "ATTR FAIL:" << attrs[ pos ] << endl; kDebug() << "ATTR FAIL: 0x" << QString::number( attrs[ pos ], 16 ) << endl;
pos += 2; pos += 2;
} }
} }
if( fbconfigs != NULL )
XFree( fbconfigs );
return false; 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, 0, th, c->width(), c->height() - th );
XFillRectangle( display(), pix, gc, tw, 0, c->width() - tw, c->height()); XFillRectangle( display(), pix, gc, tw, 0, c->width() - tw, c->height());
XFreeGC( display(), gc ); XFreeGC( display(), gc );
glXWaitX();
} }
if( tfp_mode ) if( tfp_mode )
{ {