From f5a68f317089a2b52f787322d5384b0afadeb7cd Mon Sep 17 00:00:00 2001 From: Javier Sancho Date: Mon, 24 Apr 2017 17:48:12 +0200 Subject: [PATCH] Composing scenes --- gacela/image.scm | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) 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)))))))) -- 2.39.5