FlipBuffers()

Syntax

FlipBuffers([WaitSynchronization])
Description
Flip the back and front buffers of the current screen. The invisible area is now visible and vice versa, which allows you to do a 'double-buffering' effect (flicker free graphical displays). A screen must have been opened with OpenScreen().

The optional 'WaitSynchronization' parameter allows to wait or not for the screen synchronization before flipping the buffers (also known as 'Vertical blank synchronization').

It can have one of the following values:
   0   : disable synchronization 
   1   : enable synchronization   (default value)
Waiting for the screen synchronization allows the flip to be perfect (no 'tearing' or other visible artifacts) because the flip is performed when the screen has been fully drawed (and when the screen spot is outside of visible screen area). This also link the flip frequence to the actual screen refresh, ie: for 60Hz screen it could have at most 60 flip per seconds, etc. By default, FlipBuffers() waits for the screen synchronization.

The FlipBuffers() command must always be called outside a StartDrawing() : ... : StopDrawing() program block.

Supported OS

All

<- ExamineScreenModes() - Sprite Index - FreeSprite() ->