A simple accelerated GL compositor
Felix Bellaby
felix at bellaby.plus.com
Fri Jul 7 02:54:11 PDT 2006
Tomasz Torcz wrote:
> > I attach a simple GL based compositor that runs with the nVidia
drivers
> > * gcc -I/usr/include/nvidia -L/usr/lib64/nvidia -L/usr/lib/nvidia
\
> > * -lXcomposite -lXdamage -lX11 -lGL \
> > * `pkg-config --libs --cflags glib-2.0` glcompmgr.c
>
> also -lXfixes
I do not need -lXfixes on my platform. The dependency on libXfixes must
be coming from one of the other linked libs (probably Xdamage).
>
> But it doesn't work with mga (Matrox G550/32MB). It exist in line
1165:
> if (!(fbconfigs = glXChooseFBConfig(display, screen, fbc_attr_root,
&n)))
> return 1;
>
> changing GLX_DEPTH_SIZE few lines above to 24 (my actual display
depth)
> doesn't make any difference.
GLX_DEPTH_SIZE defines the size of the GL depth buffer, not the display
depth. For the purposes of this code, the depth buffer size determines
the number of top level windows that can be drawn on the screen. I have
been a bit greedy in requesting GLX_DEPTH_SIZE 16 (65536 windows). You
would almost certainly get away GLX_DEPTH_SIZE 8 (256 windows).
You can determine the maximum depth buffer size supported by your card
using glxinfo. It should be given in the list of supported visuals under
the dp/th column. It is very unlikely to be less than 8 on any GL card.
Felix
More information about the xorg
mailing list