diff options
-rw-r--r-- | chickadee/render/scene.scm | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/chickadee/render/scene.scm b/chickadee/render/scene.scm index 279d4e6..8aa6f1f 100644 --- a/chickadee/render/scene.scm +++ b/chickadee/render/scene.scm @@ -149,6 +149,13 @@ (material primitive-material) (targets primitive-targets)) +(define (display-primitive primitive port) + (format port "#<primitive material: ~s targets: ~s>" + (primitive-material primitive) + (primitive-targets primitive))) + +(set-record-type-printer! <primitive> display-primitive) + (define* (make-primitive #:key vertex-array (material default-material) @@ -162,6 +169,11 @@ (primitives mesh-primitives) (weights mesh-weights)) +(define (display-mesh mesh port) + (format port "#<mesh name: ~s>" (mesh-name mesh))) + +(set-record-type-printer! <mesh> display-mesh) + (define* (make-mesh #:key (name "anonymous") primitives @@ -183,6 +195,11 @@ (translation scene-node-translation) (weights scene-node-weights)) +(define (display-scene-node scene port) + (format port "#<scene-node name: ~s>" (scene-node-name scene))) + +(set-record-type-printer! <scene-node> display-scene-node) + (define* (make-scene-node #:key (name "anonymous") (children #()) |