diff options
-rw-r--r-- | sly/render/mesh.scm | 3 | ||||
-rw-r--r-- | sly/render/renderer.scm | 9 | ||||
-rw-r--r-- | sly/render/scene.scm | 2 |
3 files changed, 3 insertions, 11 deletions
diff --git a/sly/render/mesh.scm b/sly/render/mesh.scm index 2aca38f..0f6a2b0 100644 --- a/sly/render/mesh.scm +++ b/sly/render/mesh.scm @@ -58,8 +58,9 @@ (%make-mesh (make-vertex-array indices positions textures) shader texture)) -(define-method (draw (mesh <<mesh>>)) +(define-method (draw (mesh <<mesh>>) transform) (make-render-op #:vertex-array (mesh-vao mesh) #:texture (mesh-texture mesh) #:shader (mesh-shader mesh) + #:transform transform #:uniforms `(("color" ,white)))) diff --git a/sly/render/renderer.scm b/sly/render/renderer.scm index f4c5edd..bb8f297 100644 --- a/sly/render/renderer.scm +++ b/sly/render/renderer.scm @@ -71,15 +71,6 @@ activated or not." (%make-render-op transform vertex-array texture shader uniforms blend-mode depth-test?)) -(define* (transform-render-op op transform) - "Return a new render operation object that is the same as OP, but -with its transformation matrix multiplied by TRANSFORM." - (match op - (($ <render-op> local-transform vertex-array texture shader uniforms - blend-mode depth-test?) - (%make-render-op (transform* transform local-transform) vertex-array - texture shader uniforms blend-mode depth-test?)))) - (define apply-render-op ;; Rendering should only ever happen from the main thread, so ;; mutating this transform is just fine. diff --git a/sly/render/scene.scm b/sly/render/scene.scm index 837bde8..333d60b 100644 --- a/sly/render/scene.scm +++ b/sly/render/scene.scm @@ -79,7 +79,7 @@ display the scene." (map (cut iter <> transform) (scene-node-children node))) '())) (object - (transform-render-op (draw object) parent-transform)))) + (draw object parent-transform)))) (make-renderer context (list camera) |