A simple accelerated GL compositor
felix at bellaby.plus.com
Fri Jul 7 15:24:59 PDT 2006
Felix Bellaby wrote:
> The problem is probably in the colorbuffer/a column, which gives the
> alpha depth of your visuals. GL uses the alpha channel to provide
> support for blending and transparency. It would appear that the mga
> driver does not provide access to the Matrox G550 alpha buffers. Can
> anyone confirm that this in fact the case ?
> You might still find that my code will work without transparency on your
> platform. Try setting GLX_ALPHA_SIZE to 0 where it appears.
> A quick web search suggests that there are OpenGL drivers for your card
> that do provide alpha blending. You might need to use them to get
> meaningful accelerated GL compositing. Unfortunately, my non-existant
> knowledge of your hardware makes me a poor person to ask.
Thinking this over, glxinfo is only really telling us that the mga
Matrox drivers do not support X visuals with alpha buffers. It might
still be possible to create a GLXPixmap with an alpha buffer.
Could you try changing GLX_DRAWABLE_TYPE (line 1154) to GLX_PIXMAP_BIT
(i.e. drop the redundant GLX_WINDOW_BIT) ? This _might_ get you past the
ChooseFBConfig even with GLX_ALPHA_SIZE set to 1 (line 1152).
If you find that setting GLX_ALPHA_SIZE to 0 (line 1152) remains the
only way to get a valid FBConfig then either the mga drivers do not
provide access to the alpha buffers or there aren't any.
I note from some specs on the web that the card is supposed to support
alpha blending under OpenGL. This might mean that you need different
drivers, or that the card only supports alpha blending _without_ alpha
buffers (i.e. GL_CONSTANT_ALPHA blending). I suspect that the drivers
are the problem. However, if this really is a limitation of the card,
then we could still get transset-style transparency support using
constant alpha blending.
More information about the xorg