visuals of different depths on same screen?

Jeff Boerio boerio "at" ichips.intel.com
Fri Oct 1 22:43:01 2004


I'm trying to configure Xvnc so that it will accept multiple color
depths on the same screen.  We have two applications, one which is
required to run in 8-bit pseudocolor mode, and another which requires a
24-bit color depth.

There are ways to tell the Xvnc server that you want to use multiple
pixel color depths for a screen (specify "-pixdepths 8 24" on the
command line), but I am not able to get multiple visuals to accept the
24-bit depth that is required.

If I have "Xvnc :1 -pixdepths 8 24 -depth 8 -cc 3", relevant information
from xdpyinfo is as follows:
...
number of supported pixmap formats:    3
supported pixmap formats:
    depth 1, bits_per_pixel 1, scanline_pad 32
    depth 8, bits_per_pixel 8, scanline_pad 32
    depth 24, bits_per_pixel 32, scanline_pad 32
...
default screen number:    0
number of screens:    1

screen #0:
  dimensions:    1024x768 pixels (260x195 millimeters)
  resolution:    100x100 dots per inch
  depths (3):    1, 8, 24
...
  number of visuals:    6
  default visual id:  0x22
  visual:
    visual id:    0x22
    class:    PseudoColor
    depth:    8 planes
    available colormap entries:    256
    red, green, blue masks:    0x0, 0x0, 0x0
    significant bits in color specification:    8 bits
  visual:
    visual id:    0x23
    class:    GrayScale
    depth:    8 planes
    available colormap entries:    256
    red, green, blue masks:    0x0, 0x0, 0x0
    significant bits in color specification:    8 bits
  visual:
    visual id:    0x24
    class:    StaticColor
    depth:    8 planes
    available colormap entries:    256
    red, green, blue masks:    0x7, 0x38, 0xc0
    significant bits in color specification:    8 bits
  visual:
    visual id:    0x25
    class:    TrueColor
    depth:    8 planes
    available colormap entries:    8 per subfield
    red, green, blue masks:    0x7, 0x38, 0xc0
    significant bits in color specification:    8 bits
  visual:
    visual id:    0x26
    class:    DirectColor
    depth:    8 planes
    available colormap entries:    8 per subfield
    red, green, blue masks:    0x7, 0x38, 0xc0
    significant bits in color specification:    8 bits
  visual:
    visual id:    0x27
    class:    StaticGray
    depth:    8 planes
    available colormap entries:    256
    red, green, blue masks:    0x0, 0x0, 0x0
    significant bits in color specification:    8 bits

What I need to get to is a visual that has a class of PseudoColor, depth
of 8, and 256 available colors at the same time there is another visual
that is a TrueColor class, depth of 24 and the large colormap entry you
would expect to have.

I have been able to get Xvnc to have multiple screens (Xvnc :1 -screen 0
800x600x8 -screen 1 800x600x24), each with its correct colormap, so
there MUST be a way to have it all on the same screen.

Are there any X11 experts out there who can shed some light on how this
might be achieved?

     - Jeff