UnLockBuffer
UnLockBuffer
 
Parameters: NONE
Returns: NONE
 

      UnLockBuffer lets us turn off the locking placed upon the current graphics buffer.



FACTS:


      * UnlockBuffer expects that buffer will previous Locked using . If it wasn't, this may cause expected results.

      * Note: We highly recommended you read the Images tutorials also!





Mini Tutorial:


      This example times (in milliseconds) how long it takes to draw 1000 dots to the screen with and without the lockbuffer commands.

  
; Set the SCreenWidth and Screen Height Values and
; place them in the variables SW and SH
  
  SW=GetScreenWidth()
  SH=GetScreenHeight()
  
  
  
; Draw 1000 pixels , but this time using the
; locked buffer commands
  t=Timer()
  For lp =0 To 1000
     Dot Rnd(sw),Rnd(sh)
  Next
  Print Timer()-t
  
  
  
; Draw 1000 pixels, but this time using the
; locked buffer commands
  t=Timer()
  LockBuffer
  For lp =0 To 1000
     Dot Rnd(sw),Rnd(sh)
  Next
  UnLockBuffer
  Print Timer()-t
  
; Display the Screen and wait for the user to press a key
  Sync
  WaitKey
  



Note: These results are from my Duron 800mhz system. The times will vary from system to system.

  
  36.0
  24.0
  
  

 
Related Info: Images | LockBuffer :
 


(c) Copyright 2002 - 2024 - Kevin Picone - PlayBASIC.com