nanogui: Thread: Offscreen buffer / blit


[<<] [<] Page 1 of 1 [>] [>>]
Subject: Offscreen buffer / blit
From: "Robbie" ####@####.####
Date: 19 Jan 2006 15:07:05 +0000
Message-Id: <20060119150658.C165F299B7@xprdmailfe22.nwk.excite.com>

Hi All,
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).
Is this nomally achieved by allocating memory and used in pixmap functions? 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.
Could someone shed some light on this?
Much thanks.




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


Subject: Re: [nanogui] Offscreen buffer / blit
From: "Greg Haerr" ####@####.####
Date: 19 Jan 2006 16:51:18 +0000
Message-Id: <0abb01c61d18$8c8a43d0$6401a8c0@winXP>

: 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

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!


Subject: Re: [nanogui] Offscreen buffer / blit
From: "Robbie" ####@####.####
Date: 23 Jan 2006 21:34:33 +0000
Message-Id: <20060123213421.80E8C37500@xprdmailfe14.nwk.excite.com>

Please disregard my question below. I've determined that the source was from a problem with my image in memory. It turned out that I wasn't readjusting for the image size and hence, was missing a few lines.



 --- On Mon 01/23, Robbie < ####@####.#### > wrote:
From: Robbie [mailto: ####@####.####
To: ####@####.#### ####@####.####
Date: Mon, 23 Jan 2006 11:54:14 -0500 (EST)
Subject: Re: [nanogui] Offscreen buffer / blit
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.


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


[<<] [<] Page 1 of 1 [>] [>>]


Powered by ezmlm-browse 0.20.