GL, x.org 6.9, and missing TrueColor visuals

timwoj at ieee.org timwoj at ieee.org
Thu Jun 22 10:49:52 PDT 2006


If this is not the appropriate place for this question, point me to the 
right one and I'll post it over there.  I tried asking on the IRC channel, 
but got no responses about it.

I'm having a problem with gl and x.org 6.9.  GL can't seem to find any of 
the true color visuals that are on the system, but only when I connect 
from a remote machine.  xdpyinfo says the visuals are there, but 
glXChooseVisual can't seem to see them.  I have a short snippet of code 
that can demostrate it.  If I run the code on the local machine, it finds 
a visual without any problems.

I've tested the code on older versions of XF86 as well as a couple of 
different versions of Xsun, and it works there correctly.  I've also tried 
this on two separate machines running X.org 6.9 and one running 6.8.2 and 
it failed on both.

If it's something I'm not doing right in my code, I'd rather fix it that 
way than upgrade to 7.1 if I can.  I've attached the code and the output 
of xdpyinfo.  The xdpyinfo output was generated by Sun's xdpyinfo on the 
Solaris box I'm trying to connect from.

Thanks.

Tim
-------------- next part --------------
#include <GL/glx.h>
#include <X11/Xlib.h>
#include <stdio.h>

#include <X11/Xatom.h>
#include <X11/Intrinsic.h>
#include <X11/Shell.h>

int main(int argc, char** argv)
{
   XtAppContext app_context = XtCreateApplicationContext();
   Display* display = XtOpenDisplay(app_context, NULL, argv[0], "Test",
                                     NULL, 0, &argc, argv);

   if (display == NULL)
   {
      printf("Couldn't open display\n");
      return -1;
   }

   int attribute_count = 0;
   int attributes[20];

   // RGB visual
   attributes[attribute_count++] = GLX_RGBA;

   int screen = DefaultScreen(display);
   printf("using screen = %d\n", screen);
   printf("default color map = %x\n", DefaultColormap(display, screen));
   printf("default visual = %x\n", DefaultVisual(display, screen));

   XVisualInfo *visual = glXChooseVisual(display, screen, attributes);

   if (visual != (XVisualInfo*)0)
   {
      printf("valid visual\n");
   }
   else
   {
      printf("invalid visual\n");
   }
}
-------------- next part --------------
name of display:    az25-hy8k421.gddsi.com:0.0
version number:    11.0
vendor string:    The X.Org Foundation
vendor release number:    60900000
maximum request size:  16777212 bytes
motion buffer size:  256
bitmap unit, bit order, padding:    32, LSBFirst, 32
image byte order:    LSBFirst
number of supported pixmap formats:    7
supported pixmap formats:
    depth 1, bits_per_pixel 1, scanline_pad 32
    depth 4, bits_per_pixel 8, scanline_pad 32
    depth 8, bits_per_pixel 8, scanline_pad 32
    depth 15, bits_per_pixel 16, scanline_pad 32
    depth 16, bits_per_pixel 16, scanline_pad 32
    depth 24, bits_per_pixel 32, scanline_pad 32
    depth 32, bits_per_pixel 32, scanline_pad 32
keycode range:    minimum 8, maximum 255
focus:  window 0x1000002, revert to PointerRoot
number of extensions:    30
    BIG-REQUESTS
    DAMAGE
    DOUBLE-BUFFER
    DPMS
    Extended-Visual-Information
    GLX
    LBX
    MIT-SCREEN-SAVER
    MIT-SHM
    MIT-SUNDRY-NONSTANDARD
    RANDR
    RENDER
    SECURITY
    SGI-GLX
    SHAPE
    SYNC
    TOG-CUP
    X-Resource
    XC-APPGROUP
    XC-MISC
    XFIXES
    XFree86-Bigfont
    XFree86-DGA
    XFree86-DRI
    XFree86-Misc
    XFree86-VidModeExtension
    XInputExtension
    XKEYBOARD
    XTEST
    XVideo
default screen number:    0
number of screens:    1

screen #0:
  dimensions:    1600x1200 pixels (373x282 millimeters)
  resolution:    109x108 dots per inch
  depths (7):    24, 1, 4, 8, 15, 16, 32
  root window id:    0x4c
  depth of root window:    24 planes
  number of colormaps:    minimum 1, maximum 1
  default colormap:    0x20
  default number of colormap cells:    256
  preallocated pixels:    black 0, white 16777215
  options:    backing-store NO, save-unders NO
  largest cursor:    64x64
  current input event mask:    0xd8001f
    KeyPressMask             KeyReleaseMask           ButtonPressMask          
    ButtonReleaseMask        EnterWindowMask          SubstructureNotifyMask   
    SubstructureRedirectMask PropertyChangeMask       ColormapChangeMask       
  number of visuals:    16
  default visual id:  0x23
  visual:
    visual id:    0x23
    class:    TrueColor
    depth:    24 planes
    available colormap entries:    256 per subfield
    red, green, blue masks:    0xff0000, 0xff00, 0xff
    significant bits in color specification:    8 bits
  visual:
    visual id:    0x24
    class:    TrueColor
    depth:    24 planes
    available colormap entries:    256 per subfield
    red, green, blue masks:    0xff0000, 0xff00, 0xff
    significant bits in color specification:    8 bits
  visual:
    visual id:    0x25
    class:    TrueColor
    depth:    24 planes
    available colormap entries:    256 per subfield
    red, green, blue masks:    0xff0000, 0xff00, 0xff
    significant bits in color specification:    8 bits
  visual:
    visual id:    0x26
    class:    TrueColor
    depth:    24 planes
    available colormap entries:    256 per subfield
    red, green, blue masks:    0xff0000, 0xff00, 0xff
    significant bits in color specification:    8 bits
  visual:
    visual id:    0x27
    class:    TrueColor
    depth:    24 planes
    available colormap entries:    256 per subfield
    red, green, blue masks:    0xff0000, 0xff00, 0xff
    significant bits in color specification:    8 bits
  visual:
    visual id:    0x28
    class:    TrueColor
    depth:    24 planes
    available colormap entries:    256 per subfield
    red, green, blue masks:    0xff0000, 0xff00, 0xff
    significant bits in color specification:    8 bits
  visual:
    visual id:    0x29
    class:    TrueColor
    depth:    24 planes
    available colormap entries:    256 per subfield
    red, green, blue masks:    0xff0000, 0xff00, 0xff
    significant bits in color specification:    8 bits
  visual:
    visual id:    0x2a
    class:    TrueColor
    depth:    24 planes
    available colormap entries:    256 per subfield
    red, green, blue masks:    0xff0000, 0xff00, 0xff
    significant bits in color specification:    8 bits
  visual:
    visual id:    0x2b
    class:    DirectColor
    depth:    24 planes
    available colormap entries:    256 per subfield
    red, green, blue masks:    0xff0000, 0xff00, 0xff
    significant bits in color specification:    8 bits
  visual:
    visual id:    0x2c
    class:    DirectColor
    depth:    24 planes
    available colormap entries:    256 per subfield
    red, green, blue masks:    0xff0000, 0xff00, 0xff
    significant bits in color specification:    8 bits
  visual:
    visual id:    0x2d
    class:    DirectColor
    depth:    24 planes
    available colormap entries:    256 per subfield
    red, green, blue masks:    0xff0000, 0xff00, 0xff
    significant bits in color specification:    8 bits
  visual:
    visual id:    0x2e
    class:    DirectColor
    depth:    24 planes
    available colormap entries:    256 per subfield
    red, green, blue masks:    0xff0000, 0xff00, 0xff
    significant bits in color specification:    8 bits
  visual:
    visual id:    0x2f
    class:    DirectColor
    depth:    24 planes
    available colormap entries:    256 per subfield
    red, green, blue masks:    0xff0000, 0xff00, 0xff
    significant bits in color specification:    8 bits
  visual:
    visual id:    0x30
    class:    DirectColor
    depth:    24 planes
    available colormap entries:    256 per subfield
    red, green, blue masks:    0xff0000, 0xff00, 0xff
    significant bits in color specification:    8 bits
  visual:
    visual id:    0x31
    class:    DirectColor
    depth:    24 planes
    available colormap entries:    256 per subfield
    red, green, blue masks:    0xff0000, 0xff00, 0xff
    significant bits in color specification:    8 bits
  visual:
    visual id:    0x32
    class:    DirectColor
    depth:    24 planes
    available colormap entries:    256 per subfield
    red, green, blue masks:    0xff0000, 0xff00, 0xff
    significant bits in color specification:    8 bits

MIT-SHM extension not supported by server

Multi-Buffering extension not supported by server

SHAPE version 1.1 opcode: 128, base event: 64

SYNC version 3.0 opcode: 131, base event: 65, base error: 128
  system counters: 1
    SERVERTIME  id: 0x0000004a  resolution_lo: 4  resolution_hi: 0

XIE extension not supported by server

XTEST version 2.2 opcode: 147

DOUBLE-BUFFER version 1.0 opcode: 142, base error: 153
  Double-buffered visuals on screen 0
    visual id 0x23  depth 24  perflevel 0
    visual id 0x24  depth 24  perflevel 0
    visual id 0x25  depth 24  perflevel 0
    visual id 0x26  depth 24  perflevel 0
    visual id 0x27  depth 24  perflevel 0
    visual id 0x28  depth 24  perflevel 0
    visual id 0x29  depth 24  perflevel 0
    visual id 0x2a  depth 24  perflevel 0
    visual id 0x2b  depth 24  perflevel 0
    visual id 0x2c  depth 24  perflevel 0
    visual id 0x2d  depth 24  perflevel 0
    visual id 0x2e  depth 24  perflevel 0
    visual id 0x2f  depth 24  perflevel 0
    visual id 0x30  depth 24  perflevel 0
    visual id 0x31  depth 24  perflevel 0
    visual id 0x32  depth 24  perflevel 0

RECORD extension not supported by server


More information about the xorg mailing list