nanogui: blitting with more than 8bpp
Subject:
Re: blitting with more than 8bpp
From:
Kyle Harris ####@####.####
Date:
7 Jan 2000 16:34:58 -0000
Message-Id: <38761143.D5ED40E5@nexus-tech.net>
Greg Haerr wrote:
>
> Kyle -
> Other folks have reported that 16bpp works, but perhaps
> they're not running the blit demo.
>
> Your patch also will fail in the for loop:
> for(i=0; i<w; ++i)
> *dst++ = *src++;
>
[snip..]
I finally got back around to looking at this (busy with Y2K bugs... just
kidding :). I think there is a bug here. I missed the fact that dst and
src are pointers to shorts. So, my original patch was wrong. But, the
initialization of these two pointers do not appear to consider the bpp
correctly. Here's a patch that seems to work.
--- fblin16.c Fri Jan 7 05:59:41 2000
+++ fblin16.c.orig Fri Jan 7 05:56:06 2000
@@ -133,8 +133,8 @@
assert (srcy+h <= srcpsd->yres);
DRAWON;
- dst = dstpsd->addr + (dstx + dsty * dlinelen)*2;
- src = srcpsd->addr + (srcx + srcy * slinelen)*2;
+ dst = dstpsd->addr + dstx + dsty * dlinelen;
+ src = srcpsd->addr + srcx + srcy * slinelen;
while(--h >= 0) {
#if 0
/* a _fast_ memcpy is a _must_ in this routine*/
On a slightly different note. I need to read a jpeg image into memory
and then blit it to screen. I beleive you mentioned providing a
GrCopyArea function. Will this provide this feature or do I need
something else?
Thanks, Kyle.