Re: [AD] Color convertors |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
>Strange.
>Angelo, why can not the BeOS port use the current asm color conversion code
>while the QNX port can ? Can not you impose the 'width multiple of 4'
>limitation on the driver ?
I can't. The BeOS driver allows direct access to the VRAM in windowed mode, by
passing the application a serie of clipping rects that map to the visible
portions of the program window. You have to take care of updating the window
contents by writing directly to the vram only inside these rects, that
obviously can be of any size - including 1 pixel wide strips. This is not
related to the size of the program window: if for example another window
covers half of your 320x200 window, making the visible portion of it to be say
157x200, the application gets one clipping rect to be 157x200, so you must
take care of weird sizes.
On other systems like Win32, X and QNX things work different, as it is the
system that actually does the clipping for your window, and you just have to
write your gfx data to a bitmap that never changes in size. In this kind of
systems it is easy to impose a window width multiple of 4, as you always do
the conversion on the same bitmap; on BeOS the clipping rects can be of any
width, and are not related to your window size.
The problem with BeOS using the unified color conversion routines is not only
that they must provide support for spans of any width - they also have to
support *any* color combination, including *->8 conversions. This is because
in BeOS you can switch the desktop color depth on the fly while your program
is running, and it must take care of the change (in our case by changing the
blitter function)
--
Angelo Mottola
a.mottola@xxxxxxxxxx
http://www.ecplusplus.com