Mode RGBA (4,4,4,4) refused

i’m trying to set my pixel format to RGBA 4,4,4,4 and GLX refuse to set the OPENGL window for this reason :

“Couldn’t find matching GLX visual”

I saw in the read book that this setting can be applied in OGL when you’re in 16 bits
(I’am)

Any help ?

I think this is implementation specific and not required. You can see the available visuals with the glxinfo command. Some visuals are required and explains why some apps requests odd things like a 12 bit depth buffer.

From the glXGetConfig man page

   Although  a  GLX implementation can export many visuals that support GL rendering, it must support at least one RGBA visual. This visual must
   have at least one color buffer, a stencil buffer of at least 1 bit, a depth buffer of at least 12 bits, and an  accumulation  buffer.   Alpha
   bitplanes  are optional in this visual.  However, its color buffer size must be as great as that of the deepest TrueColor, DirectColor, Pseu­
   doColor, or StaticColor visual supported on level zero, and it must itself be made available on level zero.

   In addition, if the X server exports a PseudoColor or StaticColor visual on framebuffer level 0, a color index visual  is  also  required  on
   that level.  It must have at least one color buffer, a stencil buffer of at least 1 bit, and a depth buffer of at least 12 bits.  This visual
   must have as many color bitplanes as the deepest PseudoColor or StaticColor visual supported on level 0.

Thanks for these clear explanations.

Do you know where I could get the “glxinfo” command source code ?

The source code is a part of Mesa. It is in the xdemos directory together with some other interesting programs. This text by Mark Kilgard describes things pretty much in detail: http://toolbox.sgi.com/linux/documents/OpenGL/overviews.html#mjkOiX

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.