diff options
author | David Thompson <dthompson2@worcester.edu> | 2014-02-15 20:28:18 -0500 |
---|---|---|
committer | David Thompson <dthompson2@worcester.edu> | 2014-02-16 10:46:58 -0500 |
commit | e27e57dda2c50a4c11f9075dfaac2df9ba4263c7 (patch) | |
tree | 2df3eb382ef4e9983a363310b8f3782a5e3eaa33 /examples | |
parent | 63f096c9f1fc04fe0ae080d67b42437ca5958678 (diff) |
Remove sprite batch from particles example.
This slows down the demo considerably, but sprite batches need to be
rewritten in order to be actually performant and of real value.
* examples/particle.scm (batch): Delete it.
Diffstat (limited to 'examples')
-rw-r--r-- | examples/particles.scm | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/examples/particles.scm b/examples/particles.scm index 0b5d6dd..9e53062 100644 --- a/examples/particles.scm +++ b/examples/particles.scm @@ -41,19 +41,17 @@ (* (random:normal) 1))))))) (define particle-count 500) -(define batch (make-sprite-batch (* particle-count 4))) (define background (load-sprite "images/stars.png" #:anchor null-vector2)) (define particles (generate-particles particle-count)) (define (draw-particles particles) - (with-sprite-batch batch - (for-each - (lambda (p) - (let* ((sprite (particle-sprite p))) - (set-sprite-position! sprite (particle-position p)) - (draw-sprite sprite))) - particles))) + (for-each + (lambda (p) + (let* ((sprite (particle-sprite p))) + (set-sprite-position! sprite (particle-position p)) + (draw-sprite sprite))) + particles)) (define (draw dt alpha) (draw-sprite background) |