|
a2StartLineBatch
This command begins an unfilled shape batch drawing operation.
a2StartLineBatch batchSize
batchSize Boolean
This command does not return a value.
This command begins an Advanced 2D unfilled shape batch drawing operation. The command works with all unfilled shapes. The batch size is an estimate of how many unfilled shapes are to be drawn. It doesn't matter if it's too big or too small, but the closer it is the more efficient the batch.
a = timer()
for x = 1 to 100000
a2Line rnd(screen width()), rnd(screen height()), rnd(screen width()), rnd(screen height()), rgb(rnd(255), rnd(255), rnd(255))
next x
t1 = timer()-a
a = timer()
a2StartLineBatch 100000
for x = 1 to 100000
a2Line rnd(screen width()), rnd(screen height()), rnd(screen width()), rnd(screen height()), rgb(rnd(255), rnd(255), rnd(255))
next x
a2EndBatch
t2 = timer()-a
set text opaque
print "No batch:";t1;" milliseconds"
print " Batched:";t2;" milliseconds"
WAIT KEY
a2StartDotBatch
|