Index: [thread] [date] [subject] [author]
  From: Andrew Apted <ajapted@netspace.net.au>
  To  : ggi-develop@eskimo.com
  Date: Wed, 16 Jun 1999 13:06:41 +1000

Re: First ggi project, need help

mongoose@ms241739.users.mindspring.com writes:

>  How can it get it to stop blinking?  It blinks mostly on the top with one 
>  flush per loop.  If I remove the flush or add more it blinks worse.
>  
>  In allegro ( I done the project in dos a long time ago ) I called vsync().
>  I really don't understand all this bliting and buffer types.
 
LibGGI does have a vsync like function, it is called something like
WaitRayPos() and it is in the Misc extension.  Nothing much implements
though, so it probably won't help you much.

Better is doing double buffering.  When you set the ggi mode, request 2
frames, and use ggiSetDrawingFrame & ggiSetWriteFrame functions to flip
between them (always drawing in the non-visible frame).

When that doesn't work (sometimes 2 frames aren't available), your only
other option is to draw everything into a memory buffer, and then
ggiCrossBlit it to the real screen every frame.

>  Also how is the best way to impelement transparences and animation?
>  I can't use my ggi buffered images for these without drawing pixel by
>  pixel. ( slow )

Currently there is no LibGGI extensions for Sprites, but as far as I
know it is being worked on.  The only fast way right now is to get a
DirectBuffer and do it yourself (easier might be: GetBox the affected
area, modify the buffer directly, then PutBox it back).

Hope that helps.

Cheers,
___________________________________________________
                                               \  /
  Andrew Apted   <ajapted@netspace.net.au>      \/
 

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