Index: [thread] [date] [subject] [author]
  From: Adrian Ratnapala <s369625@student.uq.edu.au>
  To  : ggi-develop@eskimo.com
  Date: Wed, 01 Jul 1998 10:25:57 +0000

Re: Removing SYNC mode

Andrew Apted wrote:

> Hi folks,
>
> I'd like to propose that we remove SYNC and ASYNC modes/flags from
> LibGGI, with the following justification :
>
> SYNC mode means "the drawing operation is guaranteed to be visible
> within a reasonable time".  The only LibGGI targets that natively have
> this behaviour is those which draw directly to the hardware (KGI, fbdev,
> svgalib, XDGA afaik).  All other targets must emulate it, and this is a
> royal PITA.
>
> My idea is that when DirectBuffer is available, it implies SYNC mode.
> When it is not available, it implies ASYNC mode.  Old DOS programs will
> expect a DirectBuffer, so doing (quick) ports won't be any harder.

This brings us to what I see is a major flaw in libggi (not one that can't
be fixed).

Libggi should provide _expicit_ support for double buffering.


Currently we are meant to us the virtual screen and flip.   This sort of
things might be the best way for the
direct targets like KGI, svagalib etc. but not for the indirect ones.  The
standard X target for example buffers
things in an XImage and then does XPutImage on ggiFlush,  DirectBuffer
draws into the XImage.   Great.  In ASYNC mode what you have is essentally
double buffering, but that does not hold true for KGI (I think?).
The XPutImage doesn't exactly _swap_ the buffers, but most users won't
care.

What we need is a explicit double buffering support (a flag on the
visual?).   Under  KGI and freinds this uses
invisible video RAM, and display X it does essentially nothing since  it is
already double buffered.

Index: [thread] [date] [subject] [author]