lock pixels speeds up drawing and reading the screen in 2D, try this
sync on:sync rate 60:set text opaque
t=timer()
for i=1 to 400
for l=1 to 300
dot i,l
next l
next i
t=timer()-t
do
text 100,100,str$(t)
sync
loop
will display the time taken to fill a 400,300 box with pixels (120000 of them), then run this
sync on:sync rate 60:set text opaque
t=timer()
lock pixels
for i=1 to 400
for l=1 to 300
dot i,l
next l
next i
unlock pixels
t=timer()-t
do
text 100,100,str$(t)
sync
loop
and notice the
slight
time difference, don`t forget to unlock pixels after you have locked them though.
Mentor.
PC1: P4 hyperthreading 3ghz, 1gig mem, 2x160gig hd`s, Nvidia FX5900 gfx, 6 way surround sound, PC2: AMD 1.2ghz, 512mb ram, FX5200 ultra gfx, stereo 16 bit soundblaster, ups.