I have a question related to this...

On Wed, Sep 19, 2001 at 07:05:21PM +0200, Andreas Beck wrote:
> > x = GGI_RP_DONTCARE;
> > y = GGI_RP_SYNC;
> 
> As brian said, it is wise to reset the values before each call. However
> a few extra words about how to get stuff flicker-free:
> 
> > while (pos_x < width) {
> >    /* clear screen to default color */
> >    ggiSetGCForeground(vis, ggiMapColor(vis, &col));
> >    ggiFillscreen(vis);
> 
> Don't do that, if it can be avoided. Filling the whole screen may take some
> time and might thus cause flicker.
> 
> >    draw_cross(vis, pos_x, pos_y, fcol);
> >    ggiWaitRayPos(vis, &x, &y);
> >    ggiFlush(vis);
> 
> Not a good sequence. Better is:
> 
> ggiWaitRayPos(vis, &x, &y);
> draw_whatever();
> ggiFlush();

I was under the impression that GGI could support double or
triple buffers FBs. Which if I understand correctly, 
are used to avoid flicker and other bad behavior.

So can something like this be done?

1. Draw lots of items to an inactive buffer
2. Flush when the image is complete. 
3. On vertical retrace make the inactive buffer active.

How would this be done?

I am assuming that when triple buffered there is an opportunity
to complete drawing operations for the next buffer and then move
on to drawing the one to be used after that so the a fully 
drawn 'next' buffer is ready whenever the retrace happens.

In fact I would think that is might actually be a good idea to
lock an inactive buffer (with regards to switching) until 
the application unlocks it (maybe with flush) and the drawing 
commands are actually complete.

Enough of my guesses, 
I should ask, how are things really done?

Regards,

Curtis

-- 

Curtis Veit                    email: [EMAIL PROTECTED]
Lineo Inc.                     Where Open Meets Smart
390 South 400 West             phone: 801.426.5001 
Lindon, Utah, USA  84042       fax:   801.852.8071


Reply via email to