Flip
Changes the current video display page
Flip [ frompage ] [, topage ]
frompage
In normal graphics mode, Flip is an alias for PCopy and ScreenCopy. See ScreenCopy for details.
In OpenGL mode, Flip does a hardware page flip and displays the contents of the backbuffer. It is recommended that you call Flip regularly while in OpenGL mode, otherwise your app may also become unresponsive.
Syntax
Usage
Flip [ frompage ] [, topage ]
Parameters
frompage
previous page
topagenew page to display
Description
In normal graphics mode, Flip is an alias for PCopy and ScreenCopy. See ScreenCopy for details.
In OpenGL mode, Flip does a hardware page flip and displays the contents of the backbuffer. It is recommended that you call Flip regularly while in OpenGL mode, otherwise your app may also become unresponsive.
Example
ScreenRes 320, 240, 32, 2 'Sets up the screen to be 320x240 in 32-bit color with 2 video pages.
For n As Integer = 50 To 270
ScreenSet 1,0 'Sets the working page to 1 and the displayed page to 0
Cls
Circle (n, 50),50 ,RGB(255,255,0) 'Draws a circle with a 50 pixel radius in yellow on page 1
Flip 1,0 'Copies our circle from page 1 to page 0
Sleep 25
Next
Print "Now wasn't that neat!"
Print "Push any key."
Sleep
For n As Integer = 50 To 270
ScreenSet 1,0 'Sets the working page to 1 and the displayed page to 0
Cls
Circle (n, 50),50 ,RGB(255,255,0) 'Draws a circle with a 50 pixel radius in yellow on page 1
Flip 1,0 'Copies our circle from page 1 to page 0
Sleep 25
Next
Print "Now wasn't that neat!"
Print "Push any key."
Sleep
Dialect Differences
- Not available in the -lang qb dialect unless referenced with the alias __Flip.
Differences from QB
- New to FreeBASIC