nanogui: nanox double buffering
Subject:
RE: [nanogui] nanox double buffering
From:
Junior ####@####.####
Date:
6 Jun 2007 18:08:14 +0100
Message-Id: <631457FE4F0.0000034Eejr@inbox.com>
Hi All,
Just an addition, alternatively, is there a mechanism where I can blit a
changes region or the difference from one buffer to another?
Thank you.
> -----Original Message-----
> From: ####@####.####
> Sent: Wed, 6 Jun 2007 08:22:39 -0800
> To: ####@####.####
> Subject: [nanogui] nanox double buffering
>
> Hi all,
> I'm a bit baffled by a problem I have with double buffering.
> I borrowed some code from Jordan's patch for double buffering and
> those who use it before may have some ideas. I'll appreciate it.
>
> fliping the buffer essentially does what the code below shows.
> To me it looks like when the buffer is flipped, the order is
> "flip then draw" instead of "draw then flip". I say this because the
> screen
> shows what looks like a background drawing flicker.
>
> I don't see how this could happen but surely I'm missing something.
> Does anyone know where this occurs and how to change it?
>
> void
> GdPanScreen(PSD psd, int xoffset, int yoffset) {
>
> if (!psd->PanScreen) return;
> if ((psd->xvisible != psd->xvirtres)) {
> /* Bound it */
> if (xoffset < 0) xoffset = 0;
> if (xoffset + psd->xvisible > psd->xvirtres)
> xoffset = psd->xvirtres - psd->xvisible;
> }
> else
> xoffset = 0;
>
> if ((psd->yvisible != psd->yvirtres)) {
>
> /* Bound it */
> if (yoffset < 0) yoffset = 0;
> if (yoffset + psd->yvisible > psd->yvirtres)
> yoffset = psd->yvirtres - psd->yvisible;
> }
> else
> yoffset = 0;
>
> if (xoffset != psd->xoffset || yoffset != psd->yoffset) {
> psd->yoffset = yoffset;
> psd->xoffset = xoffset;
>
> fb_var.xoffset = xoffset;
> fb_var.yoffset = yoffset;
> ioctl(fb, FBIOPAN_DISPLAY, &fb_var);
>
> }
>
> Thank you.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ####@####.####
> For additional commands, e-mail: ####@####.####