nanogui: Offscreen buffer / blit


Previous by date: 23 Jan 2006 16:54:19 +0000 banner code fragments, sai baba
Next by date: 23 Jan 2006 16:54:19 +0000 Re: Offscreen buffer / blit, Robbie
Previous in thread: 23 Jan 2006 16:54:19 +0000 Re: Offscreen buffer / blit, Greg Haerr
Next in thread: 23 Jan 2006 16:54:19 +0000 Re: Offscreen buffer / blit, Robbie

Subject: Re: [nanogui] Offscreen buffer / blit
From: "Robbie" ####@####.####
Date: 23 Jan 2006 16:54:19 +0000
Message-Id: <20060123165414.95C0919737A@xprdmailfe3.nwk.excite.com>

I have an image in memory (decoded as a 160 x120 pixel image) and using the following sequence to display it. It appears that the data is being interpreted as a 32 bit instead of 16 resulting in a larget image with visible horizontal lines.
Anyone have any idea how to fix this?

GrArea(pmap, c_gc, 0, 0, 160, 120, (void *)c_data, MWPF_TRUECOLOR555);
GrCopyArea(c_image, c_gc, 0, 0, 160, 120, pmap, 0, 0, MWROP_USE_GC_MODE); 

c_data is actually a u16 * (unsigned short).
Thanks.


 --- On Thu 01/19, Greg Haerr < ####@####.#### > wrote:
From: Greg Haerr [mailto: ####@####.####
To: ####@####.#### ####@####.####
Date: Thu, 19 Jan 2006 09:51:09 -0700
Subject: Re: [nanogui] Offscreen buffer / blit
: When creating an offscreen buffer, is the GrNewPixmap involved. It's not
clear if the last argument is still not used or is it?. I saw one example of
this that appear to be used but its acturally not used (slider).

The last parameter is not used in GrNewPixmap. It was originally going to
be
used for allowing the client to allocate shared memory for the pixmap.
Instead,
the server always allocates memory for pixmaps.



: Is this nomally achieved by allocating memory and used in pixmap
functions?

The server allocates memory for the "hidden window" display area. For
normal
windows, the framebuffer is used for the display area. Since pixmaps are
never
directly displayed, server memory is used instead.



: furthermore, is their a doc describing how bliting works? I've always
thought this related to GrCopyArea but I think I'm off target here.

Blitting is just a fast memory copy. Yes, GrCopyArea is the method used.
When
any bits of a pixmap are desired to be displayed, GrCopyArea is used to blit
the bits to a displayed window, thus transferring the bits to the
framebuffer.

Regards,

Greg

_______________________________________________
Join Excite! - http://www.excite.com
The most personalized portal on the Web!



Previous by date: 23 Jan 2006 16:54:19 +0000 banner code fragments, sai baba
Next by date: 23 Jan 2006 16:54:19 +0000 Re: Offscreen buffer / blit, Robbie
Previous in thread: 23 Jan 2006 16:54:19 +0000 Re: Offscreen buffer / blit, Greg Haerr
Next in thread: 23 Jan 2006 16:54:19 +0000 Re: Offscreen buffer / blit, Robbie


Powered by ezmlm-browse 0.20.