[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: X with 16 Bit ...

> I want to configure my X with 16 Bit on my IBook2 with aty128 for
> running opengl with 1024x786 pixels.
> But after that, I saw, X felt back to 15 Bit and my screen was green.
> How can I fix it?

You can never fix 16-bit color. It is not possible to display
any shade of grey while in 16-bit mode, excepting black and white.
Look at the bits! I'll put the most-significant bit on the left.

I'll pick a 6-bit green value, in binary. 001101 looks good.
Now what do you want for 5-bit red and blue, 00110 or 00111?
You get either this:

r 001100011000110001100011000110...
g 001101001101001101001101001101...
b 001100011000110001100011000110...

or you get this:

r 001110011100111001110011100111...
g 001101001101001101001101001101...
b 001110011100111001110011100111...

It doesn't work the other way either. You can't pick ANY 5-bit
value and get a matching 6-bit value, except with black and white.

With 5 bits, the space between values is 1/31 of the range.
With 6 bits, the space between values is 1/63 of the range.
Since 31 doesn't have any common factors with 63, the only
pure grayscale values are black and white. Eeeew!

Your only hope is to get lucky with broken D->A hardware, in
which case you might be able to pretend you have a 15-bit display
by setting the low green bit equal to the high green bit. Gross!

Reply to: