[AD] Proposal: set_rgb_mode

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


On 2002-03-07, Eric Botcazou <ebotcazou@xxxxxxxxxx> wrote:
> > just a small folowup... IIRC the SYSTEM_NONE driver is ment to make sure
> > NO OS dependent code is used. Basically all that is availible is the
> > memory bitmap functions.
> 
> Yes, that's probably the most sensible point of view

That reminds me: I would like SYSTEM_NONE to assume RGB ordering for
bitmaps.  It's important when interacting with other libraries.

But, 4.0.x already has a set behaviour, and it's best if this is not
changed in 4.1.x.  I propose to add a separate function to explicitly
pick an RGB/BGR mode, as an alternative to set_gfx_mode():


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.

   You should not normally call this function, as Allegro automatically
   picks the correct mode for your video card when you call set_gfx_mode().
   This function was really designed for use with the SYSTEM_NONE system
   driver, where it may be required for interacting with other libraries.


I'm not sure about the name.

To clarify, it would set the _rgb_*_shift_15 global variables to the
right values for the mode.



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