With the overlay fix double-buffering now works too.
Also dump drawing directly into the root window, OpenGL normally clips the root window, so nothing is drawn. NVidia has "DisableGLXRootClipping", but there's no way to detect that and there's still the non-db mode. svn path=/branches/work/kwin_composite/; revision=604019
This commit is contained in:
parent
a222c2a675
commit
340e64ab51
2 changed files with 1 additions and 30 deletions
|
@ -49,14 +49,6 @@ General TODO
|
|||
! - scene_xrender.cpp also requires XFixes
|
||||
! - check whether it compiles fine without XComposite/XDamage
|
||||
|
||||
? XComposite overlay window
|
||||
? - does it make any sense to use it instead of painting directly to the root window
|
||||
when the root window's visual etc. are good?
|
||||
- it seems OpenGL drawing to the root window is always clipped, unlike with X drawing,
|
||||
so the overlay should be always used, or manual double-buffering should be used
|
||||
- nvidia has option "DisableGLXRootClipping" though, make kwin config option to draw
|
||||
directly to the root window?
|
||||
|
||||
! the opacity slider in the Alt+F3 menu doesn't work
|
||||
- looks like the hack with adding custom widgets to popups no longer works
|
||||
- it should probably be just changed to normal menu with reasonable opacity values
|
||||
|
|
|
@ -88,18 +88,6 @@ static void checkGLError( const char* txt )
|
|||
kWarning() << "GL error (" << txt << "): 0x" << QString::number( err, 16 ) << endl;
|
||||
}
|
||||
|
||||
// attributes for finding a double-buffered root window config
|
||||
const int root_db_attrs[] =
|
||||
{
|
||||
GLX_CONFIG_CAVEAT, GLX_NONE,
|
||||
GLX_DOUBLEBUFFER, True,
|
||||
GLX_RED_SIZE, 1,
|
||||
GLX_GREEN_SIZE, 1,
|
||||
GLX_BLUE_SIZE, 1,
|
||||
GLX_RENDER_TYPE, GLX_RGBA_BIT,
|
||||
None
|
||||
};
|
||||
|
||||
// attributes for finding a double-buffered destination window config
|
||||
static const int buffer_db_attrs[] =
|
||||
{
|
||||
|
@ -238,18 +226,9 @@ void SceneOpenGL::initBuffer()
|
|||
{
|
||||
XWindowAttributes attrs;
|
||||
XGetWindowAttributes( display(), rootWindow(), &attrs );
|
||||
if( false && findConfig( root_db_attrs, &fbcbuffer, XVisualIDFromVisual( attrs.visual )))
|
||||
{
|
||||
// root window is double-buffered, paint directly to it
|
||||
// TODO no need to use overlay?
|
||||
db = true;
|
||||
buffer = rootWindow();
|
||||
glxbuffer = glXCreateWindow( display(), fbcbuffer, buffer, NULL );
|
||||
}
|
||||
else if( false && findConfig( buffer_db_attrs, &fbcbuffer ) && wspace->createOverlay())
|
||||
if( findConfig( buffer_db_attrs, &fbcbuffer ) && wspace->createOverlay())
|
||||
{ // we have overlay, try to create double-buffered window in it
|
||||
XVisualInfo* visual = glXGetVisualFromFBConfig( display(), fbcbuffer );
|
||||
kDebug() << "Using overlay visual 0x" << QString::number( visual->visualid ) << endl;
|
||||
XSetWindowAttributes attrs;
|
||||
attrs.colormap = XCreateColormap( display(), rootWindow(), visual->visual, AllocNone );
|
||||
buffer = XCreateWindow( display(), wspace->overlayWindow(), 0, 0, displayWidth(), displayHeight(),
|
||||
|
|
Loading…
Reference in a new issue