nanogui: nanox double buffering
Subject:
Re: [nanogui] Re: nanox double buffering
From:
"Greg Haerr" ####@####.####
Date:
13 Jun 2007 20:12:46 +0100
Message-Id: <04ef01c7adee$b18eb590$0300a8c0@RDP>
> If I don't turn expose off, it'll flicker when I do the CopyArea.
Look at the code in nanox/srvfunc.c::GrCopyArea. #if 0 the
special case code (DYNAMICREGIONS) that
sends an expose event for the very special case when
src and dest are onscreen and the window is partially
obscured. There may be a bug there.
You shouldn't have to turn off expose events for
your copyarea. That code needs to be removed
from your application, and/or the above code needs
commenting out.
> How do I turn off background erase? I don't see that flag in the
either the GC or WINDOW structs.
Its a GrSetWMProperties flag.
Regards,
Greg
Jr.
> int i = 0;
> void handle_event(void)
> {
> if((OT_SFLAG & OT_SCRN_REWR) !=0)
> {
> GrFlush();
> printf("Flip\n");
> if(i < 1){
> i++;
> printf("cols: %d, rows: %d,
> active:%d\n",tscrn_info.cols,tscrn_info.rows,dbuff->active);
> printf("viscols: %d, visrows:
> %d\n",tscrn_info.viscols,tscrn_info.visrows);
> GrFlipBuffers(dbuff);
> GrSetGCGraphicsExposure(scrn_gc, GR_FALSE);
> printf("Copy\n");
> GrCopyArea(dbuff->buf[!dbuff->active], scrn_gc, 0, 0,
> tscrn_info.viscols,
> tscrn_info.visrows, dbuff->buf[dbuff->active] ,0,
> 0,MWROP_COPY);
> GrSetGCGraphicsExposure(scrn_gc, GR_TRUE);
> main_window = dbuff->buf[!dbuff->active];
> }
>
> ...
> }
>
> With this configuration, the screen is perfectly still, updating as
> expected.
> Without the "if" statement there is undesirable flashes on the screen
> that
> seem to
> occur during the GrCopyArea. Atleast I didn't seen the horiz lines during
> the copy.
> Nonetheless, if I'm writing to the main_window which is not active,
> Why is the screen being updated? That's whay I'm dying to explain.
>
> Any senario is welcome.
____________________________________________________________
GET FREE 5GB EMAIL - Check out spam free email with many cool features!
Visit http://www.inbox.com/email to find out more!
---------------------------------------------------------------------
To unsubscribe, e-mail: ####@####.####
For additional commands, e-mail: ####@####.####