a2EndBatch

This command will end a batch drawing operation.

  Syntax
a2EndBatch
  Parameters

This command has no parameters.

  Returns

This command does not return a value.

  Description

This command will end a batch drawing operation started by a2StartDotBatch, a2StartLineBatch, or a2StartTriangleBatch.

  Example Code
a = timer()

for x = 1 to 100000
    a2Dot rnd(screen width()), rnd(screen height()), rgb(rnd(255), rnd(255), rnd(255))
next x

t1 = timer()-a
a = timer()
a2StartDotBatch 100000

for x = 1 to 100000
    a2Dot 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

  See also

a2StartDotBatch
a2StartLineBatch
a2StartTriangleBatch
Advanced 2D Index
Main Menu