nanogui: nanox double buffering


Previous by date: 13 Jun 2007 18:49:47 +0100 Re: nanox double buffering, Junior
Next by date: 13 Jun 2007 18:49:47 +0100 Re: nanox double buffering, Junior
Previous in thread: 13 Jun 2007 18:49:47 +0100 Re: nanox double buffering, Junior
Next in thread: 13 Jun 2007 18:49:47 +0100 Re: nanox double buffering, Junior

Subject: Re: [nanogui] Re: nanox double buffering
From: "Greg Haerr" ####@####.####
Date: 13 Jun 2007 18:49:47 +0100
Message-Id: <044c01c7ade3$1b3ad390$0300a8c0@RDP>

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.

Greg


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.

____________________________________________________________
FREE 3D EARTH SCREENSAVER - Watch the Earth right on your desktop!
Check it out at http://www.inbox.com/earth


Previous by date: 13 Jun 2007 18:49:47 +0100 Re: nanox double buffering, Junior
Next by date: 13 Jun 2007 18:49:47 +0100 Re: nanox double buffering, Junior
Previous in thread: 13 Jun 2007 18:49:47 +0100 Re: nanox double buffering, Junior
Next in thread: 13 Jun 2007 18:49:47 +0100 Re: nanox double buffering, Junior


Powered by ezmlm-browse 0.20.