On Tue, 19 Dec 2000, Cesar Crusius wrote:
> somebody has to add info about these functions in the ggiPutBox and
> ggiGetBox man pages! (it would have saved me lots of trouble). just
> one thing missing: i guess void* needs to be allocated before
> ggiPackColors, but how do i know what size to allocate?
Well, if you didn't know about the packing functions, just to be sure,
make sure you know what ggiCrossBlit does and that you know how to use
the memory visual target. That will give you a way to make it faster than
packing/unpacking pixels. I'm not sure how many targets have implemented
accel for cross-blits, but I think at least a few have so far. In any
case, most common cases have been optimized to the extent possible without
hardware accelleration.
BTW, the source for the linear_* crossblit functions
(e.g. lib/libggi/default/linear_16/crossblit.c) reads like a manual
on "how to use the pixelformat fields" and is worth a read.
--
Brian