[AD] 6bit limitation of paletted modes.

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


> That is correct. Actually, it"s been correct for quite a while (my old 
> Cirrus Logic card in my 486 (which was new when it was bought) supported 
> an 8bit-wide DAC). The reason it"s not actually been "fixed" is because 
> it"d break every Allegro program that assumes 6-bits-per-component palettes.

It seems then that support for 8bit DACs would be in (almost) every
machine that newer allegro versions would support. In this case,
wouldn't it be possible that the 6bit DAC be emulated through the 8bit
one?

I mean older programs that assume 6bit components would still show the
correct colors, just in 1/4 the brightness (0-63 instead if 0-255).
That means that a simple x4 scaling would render the correct result.
Then a compatibility mode could be added (so the scaling is handled
automatically), via an al_enable_6bit_palette() call after setting the
color depth; this would require minimal changes to (fairly recent)
existing programs (just add this and recompile). And, in any case,
older programs that rely on older allegro versions wouldn't work with
the newer allegro out of the box.

This could be a fairly clean solution regarding the end user (who
programs with allegro), since it would need minimal source code
changes (and most examples that use palettes would continue to work
without changing the palette generation code immediately, which can be
quite a lot of work). What do you think?

PS: Is there any concrete benefit of using 0.0-1.0 ranges in paletted
modes? This would result in a 4fold size increase of the RGB struct.




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/