Re: [AD] Color depth in X version of Allegro

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


"Vincent PENQUERC'H" <vpenquerch@xxxxxxxxxx> writes:

> I have just downloaded 3.9.28, and I read the docs on X, since I am
> going to try to pinch it in my game.
> Regarding the (matching|slow|fast) color depth settings, I read in the
> readme.uni that if a program is requesting a color depth not the same as
> the current one, it is emulated. I read too that the program can find
> out about this by checking gfx_driver->desc for the right string. My
> question is: is there a flag somewhere that gives this same indication?
> I find awkward to check against a text string, since it could be changed
> afterwards or translated or whatever....

gfx_driver->desc should be used only for printing it to the user.
It should not be used in any other way, IMHO.  Currently there is no
way to obtain information about nature of graphics driver in X.  We
can use id flags in BITMAP structure to identify bitmaps that are
emulating color depths, but I'm not sure how useful it will be.
Though it won't hurt anything to add it (less sub bitmaps maybe).
For example

#define BMP_EMULATED 0x01000000L

if (screen->id & BMP_EMULATED)
   /* Screen color depth is emulated (visible colors may not represent
    * all colors available in bitmap).  */

-- 
Michael Bukin



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