Re: [AD] X11 desktop_color_depth()

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


Peter Wang <tjaden@xxxxxxxxxx> writes:

> What values can _xwin.window_depth take?

I think it returns the number of useful bits, i.e. 15 for 15-bpp X-win
modes, 24 for both 24-bpp and 32-bpp modes.  It is better to use "fast"
mode, where we can use direct access to XImage instead of XImage API.
"Matching" mode is even better, where screen and XImage share the same
data, so graphics primitives write directly to XImage.  "Matching"
mode should have the same number of bits as window.  AFAIK, only 8,
15, 16 and 32-bpp can be "matching".  In short, 15-bpp can be returned
as desktop depth too.

-- 
Michael Bukin



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