Re: [AD] Proposal: set_rgb_mode |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
On 2002-03-08, Sven Sandberg <svsa1977@xxxxxxxxxx> wrote:
> Peter Wang wrote:
>
> > void set_rgb_mode(int rgb_mode);
> > Set color shifting values for truecolour bitmaps. Pass non-zero to
> > make Allegro use RGB ordering, or zero to use BGR ordering.
>
> Do you also plan to make later calls to set_gfx_mode() prefer
> the given order? Is this possible?
I doubt it (maybe as an esoteric feature on some cards). It'd be of
dubious value anyway, and complicate things.
> Anyway, I like the idea. I
> think it should even be allowed to set an rgb order other than
> screen's when a graphics mode is set (so drawing to screen
> would look wrong until you changed back, but you can
> communicate with other libraries).
Right. Then I propose:
#define AL_LAYOUT_RGB 0
#define AL_LAYOUT_BGR 1
int al_set_color_layout(int layout);
blah blah blah. Returns the previous layout.
i.e. gives you a way to switch to a specific layout then switch back.
... And welcome back to the final round of the Pick a Function Name or
Interface Competition. The competition has been red hot, but after
much deliberation and passing of money underneath tabletops in not-so-
reputable establishments with morally dubious ladies who might as well
not be wearing anything, reminiscent of 80's and early-90's movies,
the judges (i.e. me) have picked a winner. <drum roll> Eric Botcazou's
entry scored the highest, based on previously undisclosed criteria
(this line in the bible: ``The layout of these components can vary
depending on your hardware, but will generally either be RGB or
BGR.''). Eric's interface was judged most scalable if one day Martian
engineers decided that GGG was the best colour layout. Eric wins a
one-way trip to France and dictatorship of a minor open source project.