Re: [AD] windowed mode patch |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
Shawn Hargreaves <shawn@xxxxxxxxxx> writes:
> Isaac Cruz <icruzbal@xxxxxxxxxx> writes:
> > - new global variable, desktop_color_depth (only in Windows code)
> ...
> I'm not sure how directly the color depth will apply to X code, as not all X
> hardware even has a single global color depth setting (Michael? Is there
> a call that can tell us this without having to create a window first?), but
> it could certainly be useful for other windowed environments (BeOS springs
> to mind).
After installing SYSTEM_XWIN driver in allegro_init (install_allegro),
window depth is accessible as _xwin.window_depth. It should not be
used as fastest color depth, though. Best color depth for Allegro
screen can be calculated by the following table:
window_depth set_color_depth
<= 8 8
<= 16 16
other 32
Whether resulting Allegro color depth is fast or not will be clear
after creating screen bitmap in set_gfx_mode.
Historical note: in XwinAllegro I tried to find best visual by
searching through them and matching with requested color depth, but
that was rather large and not reliable code and could benefit only
for X servers that support visuals with different color depths on one
Screen.
--
Michael Bukin