VWait [frames]  

Definition:

Waits for one or more vertical blanks to happen before continuing the program.

Parameter Description:


[frames] = optional number of frames to wait

Command Description:

There are times when you can draw too fast, and your drawing operations happen so fast that you get undesireable effects. This command forces Blitz to wait until the drawing scan line reaches the bottom of the screen before proceeding. Try the example with and without the VWAIT command.

Example:

; Vwait example
Graphics 800,600,16

; Wait for ESC to hit
While Not KeyHit(1)
; Set a random color
Color Rnd(255),Rnd(255),Rnd(255)
; Draw a random line
Line Rnd(800),Rnd(600),Rnd(800),Rnd(600)
; Wait For a vertical blank to happen before looping
VWait
Wend

Index