Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
standard GfxLib speed
#12
Quote:Exactly. Look at the gfxlib.txt documentation, MULTIKEY example; it uses page flipping. Let me know how well it performs!

I changed the mode to 16-bit, replaced CLS with a small hack (only cursor is wiped), added page flipping and FPS counter.

The old code speed on my PII 500MHz: 5-6 FPS
The new code: 500-800 FPS

LOOOOOOL

Thanks!!!



Code:
screen 18, 16, 2, 1
screenset 1,0

line (0,0)-(27,27), rgb(255,0,255), BF
line (0,0)-(27,27), rgb(255,255,255)
dim cursor((28 * 28 * 2) + 4)
get (0,0)-(27,27), cursor
cls

work_page = 0

dim ctime as single
dim count as integer
count = 0
ctime = timer + 1

do while not multikey(&h01)
   screenset work_page, work_page xor 1

   line (old_mx,old_my)-(old_mx+27,old_my+27), rgb(0,0,0)
   old_mx=mx: old_my=my
  
   getmouse mx,my

   count = count + 1
   if ctime <= timer then
      locate 1,1: print count
      count = 0
      ctime = timer + 1
   end if  
      
   circle (320, 240), 200, rgb(255,0,0)
   put (mx, my), cursor, TRANS
   work_page = work_page xor 1
loop
img]http://img59.exs.cx/img59/7237/aqsig2el.png[/img]
Reply


Messages In This Thread
standard GfxLib speed - by Aquarius - 02-02-2005, 07:19 PM
standard GfxLib speed - by steven_basic - 02-02-2005, 07:52 PM
standard GfxLib speed - by Z!re - 02-02-2005, 08:17 PM
standard GfxLib speed - by na_th_an - 02-02-2005, 08:31 PM
standard GfxLib speed - by lillo - 02-02-2005, 08:38 PM
standard GfxLib speed - by 1000101 - 02-02-2005, 08:45 PM
standard GfxLib speed - by Aquarius - 02-02-2005, 10:25 PM
standard GfxLib speed - by lillo - 02-02-2005, 10:33 PM
standard GfxLib speed - by v3cz0r - 02-02-2005, 10:44 PM
standard GfxLib speed - by Z!re - 02-02-2005, 11:01 PM
standard GfxLib speed - by na_th_an - 02-02-2005, 11:21 PM
standard GfxLib speed - by Aquarius - 02-02-2005, 11:24 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)