nanogui: nanox double buffering
Subject:
Re: [nanogui] Re: nanox double buffering
From:
Junior ####@####.####
Date:
13 Jun 2007 19:42:36 +0100
Message-Id: <BBE4FF19360.000003E3ejr@inbox.com>
> I'm not sure what is happening yet. You need to GrFlush()
> after your CopyArea call though. You didn't mention
> the GCGraphicsExposure changes, I'm not sure why
> you're changing it, and that's likely where your problems
> are. Make sure your window has background erase
> turned off.
If I don't turn expose off, it'll flicker when I do the CopyArea.
How do I turn off background erase? I don't see that flag in the
either the GC or WINDOW structs.
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!