On Friday 25 February 2005 12:54, Stephan Kulow wrote:
> Am Friday 25 February 2005 18:03 schrieb Dieter Nützel:
> > Am Freitag, 25. Februar 2005 16:47 schrieb Adam Jackson:
> > > On Thursday 24 February 2005 13:27, Marcello Maggioni wrote:
> > > > With XSCREENSAVER alone it effectively runs without problems , but I
> > > > wonder why ...
> > > >
> > > > There's a logical explanation for this?? O_o
> > >
> > > Yeah.  KDE's screensaver module probably opens its own fullscreen
> > > window and tells the screensaver to draw on that.  Since the window is
> > > already created the screensaver can't change its visual, which means if
> > > the window was created in a single buffer visual you're stuck.
> >
> > So someone should send a bug report to fix that before KDE 3.4
> > arise...;-)
>
> How? We create a fullscreen window for all screen savers.

Run glxinfo and look at the output near the bottom:

   visual  x  bf lv rg d st colorbuffer ax dp st accumbuffer  ms  cav
 id dep cl sp sz l  ci b ro  r  g  b  a bf th cl  r  g  b  a ns b eat
----------------------------------------------------------------------
0x23 24 tc  0 24  0 r  y  .  8  8  8  0  0  0  0  0  0  0  0  0 0 None
0x24 24 tc  0 24  0 r  .  .  8  8  8  0  0  0  0  0  0  0  0  0 0 None
0x25 24 tc  0 24  0 r  y  .  8  8  8  0  0 24  8  0  0  0  0  0 0 None
0x26 24 tc  0 24  0 r  .  .  8  8  8  0  0 24  8  0  0  0  0  0 0 None
0x27 24 tc  0 24  0 r  y  .  8  8  8  0  0  0  0 16 16 16  0  0 0 Slow
0x28 24 tc  0 24  0 r  .  .  8  8  8  0  0  0  0 16 16 16  0  0 0 Slow
0x29 24 tc  0 24  0 r  y  .  8  8  8  0  0 24  8 16 16 16  0  0 0 Slow
0x2a 24 tc  0 24  0 r  .  .  8  8  8  0  0 24  8 16 16 16  0  0 0 Slow

Note the 'db' column, indicating a double-buffered visual.  By default X 
windows are not created in double-buffered visuals.  The way to find a 
double-buffered visual is something like:

int attribs[] = { GLX_DOUBLEBUFFER, /* ..., */ None };
XVisualInfo *vis = glXChooseVisual(dpy, DefaultScreen(dpy), attribs);

There's also a way to do this within the DBE extension, which one or two of 
the xscreensaver hacks want, but I don't know it offhand.  I expect Qt has an 
idiom for this as well.

- ajax

Attachment: pgpWxlZrSTHYi.pgp
Description: PGP signature

Reply via email to