Colormap settings?

Glynn Clements glynn at gclements.plus.com
Tue Dec 18 09:39:58 PST 2007


Florian Harmuth wrote:

> i have a little problem regarding colormaps. After a call of XCreateImage /
> XShmCreateImage i get under my via cpu (savage gpu) for image->red_mask a
> value of 0xf800. Under my Geode cpu i get 0x0 for all color masks. My
> problem is that i should use xrfbviewer where the color choose is
> implemented with a dependecy on this color values (XFramebuffer.cc).
> I have attached my Xorg.log file where one line says it uses PseudoColors.
> Is that my problem?

Yes. The colour masks are only meaningful for TrueColor and DirectColor
visuals.

> Any suggestions?

Well, you can tell the X server to use a TrueColor visual with "-cc 4",
but you'll also need to increase the display depth above 8bpp (with
e.g. "-depth 16") to get decent quality.

The only other solution is to re-write the code to support other visual
types.

Even then, there are so many applications which take a true-colour
display for granted that this particular application is likely to be
the least of your problems. It isn't just code which is the problem,
but also graphics (icons, splash screens etc) which can consume the
entire colourmap.

-- 
Glynn Clements <glynn at gclements.plus.com>



More information about the xorg mailing list