Support for High Resolution Color
(by Michael Godfrey, godfrey@isl.stanford.edu)
This Web page describes the implementation of X11 color visuals with
color depth greater than 8 bits.
The purposes of these changes are:
- Try to select the "best" visual on systems which offer choices.
The previous releases of the Chipmunk tools used the default mode,
and crashed if the color depth was greater than 8.
- Support operation using TrueColor at 16 or 24 bits.
The changes require X11R5 or above. I do not know what will happen
if older X11's are used, but it is not likely to be useful.
We have done limited testing on available platforms. At present the
results are:
- As far as we know the "old way" (8 bit pseudocolor) works exactly
as before.
- The Linux (accelerated-X, and some others) and OS/2
(Hummingbird X) function at 16 and 24 bit.
- OpenWindows on Solaris fails at 16 and 24 bit.
Some servers (like Solaris X11) offer 8 bit pseudocolor as well as
high resolutions, so the SUN failure is not too serious.
In detail the changes are:
- Call XGetVisualInfo() to find out what visuals the X-server has
to offer.
- Look at the optional environment variable LOG_COLOR. If it is
present try to use the requested visual. Valid requests are:
setenv LOG_COLOR [bw | 8bit | 16bit | 24bit]. If the
requested visual is not offered LOG terminates. If there is no
LOG_COLOR variable set try: 8bit PseudoColor, 24bit TrueColor, 16bit
TrueColor in that order.
- Email
- lazzaro@cs.berkeley.edu
- Phone
- (510) 643 4005
- SMail
- UC Berkeley / CS Division / 387 Soda Hall / Berkeley CA 94720