nanogui: GrSetGCForeground with 16 bit colors
Subject:
Re: [nanogui] GrSetGCForeground with 16 bit colors
From:
"Greg Haerr" ####@####.####
Date:
8 Jun 2002 02:10:40 -0000
Message-Id: <062d01c20e8f$d10875e0$6401a8c0@gregnewport>
> I have an application which has 16 bit color values. When I put the value
in the lowest 16 bits of the MWCOLORVAL and call GrSetGCForeground, I lose
part of the color. If I shift the 16 bit value left by 8 bits, the colors
come close to what I would expect. Doing this seems to work, but I don't
know why it should. Can anyone help?
>
> I am using the XWindows driver with XWindows set to 16 bit, underlying
hardware is 16 bit.
All applications colors in Microwindows are specified in
24-bit RGB, regardless of the underlying hardware layer.
Microwindows translates the 32-bit MWCOLORVAL to
the hardware 16-bit MWPIXELVAL in this case.
The idea here was to not have to rewrite any applications regardless
of the type of hardware you're running on.
Regards,
Greg