home *** CD-ROM | disk | FTP | other *** search
/ PC Plus SuperCD 60 / supercd60_2.iso / BlitzBasic / Blitz2DPCP / data1.cab / Support / help / samples / double_buffer.bb < prev    next >
Encoding:
Text File  |  2001-11-21  |  803 b   |  27 lines

  1. ; Example of double bufferiing
  2. ; An easy to use and important feature in Blitz
  3. ; for more examples and lots of help visit www.blitzbasic.com
  4. ; or visit http://users.breathemail.net/georgebray
  5. ; Verified 1.48 4/18/2001
  6.  
  7. Graphics 640,480,16,1 ; goes into graphics mode & sets the resolution
  8.  
  9. SetBuffer FrontBuffer() ; draw to the front buffer
  10. Text 0,0,"This drawn to the front buffer"
  11. Text 50,50,"Press spacebar..."
  12. Text 50,100,"Press ecape to exit."
  13.  
  14. SetBuffer BackBuffer() ; draw to the back buffer
  15. Text 0,0,"This drawn to the back buffer"
  16. Text 50,50,"Press spacebar again..."
  17. Text 50,100,"Press escape to exit."
  18.  
  19. While Not KeyDown(1) ;keep looping until ESC pressed
  20.  
  21.  
  22.     WaitKey ;wait for any keypress
  23.     
  24.  
  25.     Flip ;swap front and back buffers
  26.     
  27. Wend ; continue until progrgram ends