summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sly/render.scm18
1 files changed, 18 insertions, 0 deletions
diff --git a/sly/render.scm b/sly/render.scm
index e69f756..47aa862 100644
--- a/sly/render.scm
+++ b/sly/render.scm
@@ -110,7 +110,10 @@
with-model-view-mul
move
scale
+ rotate-x
+ rotate-y
rotate-z
+ rotate
clear-screen
uniform-let
with-color
@@ -472,11 +475,26 @@ applies RENDERER."
RENDERER."
(with-model-view-mul (t:scale s) renderer))
+(define (rotate-x theta renderer)
+ "Create a new renderer that rotates the scene by THETA about the X
+axis and applies RENDERER."
+ (with-model-view-mul (t:rotate-x theta) renderer))
+
+(define (rotate-y theta renderer)
+ "Create a new renderer that rotates the scene by THETA about the Y
+axis and applies RENDERER."
+ (with-model-view-mul (t:rotate-y theta) renderer))
+
(define (rotate-z theta renderer)
"Create a new renderer that rotates the scene by THETA about the Z
axis and applies RENDERER."
(with-model-view-mul (t:rotate-z theta) renderer))
+(define (rotate quaternion renderer)
+ "Create a new renderer that rotates the scene by QUATERNION and
+applies RENDERER."
+ (with-model-view-mul (t:rotate quaternion) renderer))
+
(define (clear-screen gfx)
"Clear the current viewport bound to GFX."
(clear-viewport (graphics-viewport gfx)))