summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sly/render/shape.scm12
1 files changed, 7 insertions, 5 deletions
diff --git a/sly/render/shape.scm b/sly/render/shape.scm
index 8e374b3..de4fd95 100644
--- a/sly/render/shape.scm
+++ b/sly/render/shape.scm
@@ -23,15 +23,16 @@
(define-module (sly render shape)
#:use-module (sly math)
+ #:use-module (sly render)
#:use-module (sly render mesh)
- #:use-module (sly render model)
- #:use-module (sly render shader)
#:use-module (sly render texture)
#:use-module (sly math vector)
#:export (make-cube))
-(define* (make-cube size #:optional #:key (texture #f)
- (shader (load-default-shader)))
+;; TODO: Write some combinators for composing triangles into more
+;; complex shapes with a procedure to convert them into a mesh.
+
+(define* (make-cube size #:optional #:key (texture #f))
(let* ((half-size (half size))
(mesh (build-mesh #(
;; Front
@@ -112,4 +113,5 @@
(vector2 s2 t1)
(vector2 s2 t2)
(vector2 s1 t2))))))
- (make-model #:mesh mesh #:texture texture #:shader shader)))
+ (with-texture texture
+ (render-mesh mesh))))