From: Javier Sancho Date: Mon, 24 Apr 2017 15:48:12 +0000 (+0200) Subject: Composing scenes X-Git-Url: https://git.jsancho.org/?a=commitdiff_plain;h=f5a68f317089a2b52f787322d5384b0afadeb7cd;p=gacela.git Composing scenes --- diff --git a/gacela/image.scm b/gacela/image.scm index e6c8f4e..2af2b4b 100644 --- a/gacela/image.scm +++ b/gacela/image.scm @@ -25,7 +25,8 @@ #:use-module (gl) #:export (image move - scale)) + scale + over)) (define (calculate proc-or-value) (if (procedure? proc-or-value) @@ -72,3 +73,13 @@ (lambda () (gl-scale x y z) (display-scene scene)))) + +(define (over . scenes) + (make-scene + "over" + (lambda () + (let display ((sc scenes)) + (cond ((not (null? sc)) + (with-gl-push-matrix + (display-scene (car sc))) + (display (cdr sc))))))))