Hi,
I currently have XFree86 4.1.0 on the redhat 7.2 machine. I am trying to
program for the 16bit color display, but I just could not get the color
right. I already have the correct display for 8bit and 24bit on this
machine. Some help is needed and will be appreciated.
Since the display is 16bit, according to the result of xdpyinfo (see below),
the masks for r,g,b are 0xf800, 0x7e0, 0x1f. Does it mean the following
formula should generate the correct entry for a color with r, g, b value
red, green and blue?
red && 0xf800 + green && 0x7e0 + blue && 0x1f
Of course, I couldnot get the correct result with the above formula.
I used a similar thing for 24bit and it worked fine.
Thanks a lot for your help.
Best regards,
Kevin
================================
The following is the output of xdpyinfo under 16bit:
name of display: :0.0
version number: 11.0
vendor string: The XFree86 Project, Inc
vendor release number: 40100000
XFree86 version: 4.1.0
maximum request size: 4194300 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 0x60000e, revert to PointerRoot
number of extensions: 26
BIG-REQUESTS
DOUBLE-BUFFER
DPMS
Extended-Visual-Information
FontCache
GLX
LBX
MIT-SCREEN-SAVER
MIT-SHM
MIT-SUNDRY-NONSTANDARD
RENDER
SECURITY
SGI-GLX
SHAPE
SYNC
TOG-CUP
XC-APPGROUP
XC-MISC
XFree86-Bigfont
XFree86-DGA
XFree86-Misc
XFree86-VidModeExtension
XInputExtension
XKEYBOARD
XTEST
XVideo
default screen number: 0
number of screens: 1
screen #0:
dimensions: 1024x768 pixels (333x241 millimeters)
resolution: 78x81 dots per inch
depths (7): 16, 1, 4, 8, 15, 24, 32
root window id: 0x31
depth of root window: 16 planes
number of colormaps: minimum 1, maximum 1
default colormap: 0x20
default number of colormap cells: 64
preallocated pixels: black 0, white 65535
options: backing-store NO, save-unders NO
largest cursor: 32x32
current input event mask: 0xd0001d
KeyPressMask ButtonPressMask ButtonReleaseMask
EnterWindowMask SubstructureRedirectMask PropertyChangeMask
ColormapChangeMask
number of visuals: 4
default visual id: 0x23
visual:
visual id: 0x23
class: TrueColor
depth: 16 planes
available colormap entries: 64 per subfield
red, green, blue masks: 0xf800, 0x7e0, 0x1f
significant bits in color specification: 6 bits
visual:
visual id: 0x24
class: TrueColor
depth: 16 planes
available colormap entries: 64 per subfield
red, green, blue masks: 0xf800, 0x7e0, 0x1f
significant bits in color specification: 6 bits
visual:
visual id: 0x25
class: DirectColor
depth: 16 planes
available colormap entries: 64 per subfield
red, green, blue masks: 0xf800, 0x7e0, 0x1f
significant bits in color specification: 6 bits
visual:
visual id: 0x26
class: DirectColor
depth: 16 planes
available colormap entries: 64 per subfield
red, green, blue masks: 0xf800, 0x7e0, 0x1f
significant bits in color specification: 6 bits
_______________________________________________
Xpert mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/xpert