summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Thompson <dthompson2@worcester.edu>2023-05-01 08:46:03 -0400
committerDavid Thompson <dthompson2@worcester.edu>2023-05-01 08:46:03 -0400
commit1e24294e6dc9d19ae3336229a66bc646018b23d3 (patch)
treed7a524076e027cd5dd4f4d36191156107345459a
parent870f58d55abfd1bed74494ff8830b81d3610e292 (diff)
graphics: buffer: Style improvement for record type printer.
-rw-r--r--chickadee/graphics/buffer.scm21
1 files changed, 11 insertions, 10 deletions
diff --git a/chickadee/graphics/buffer.scm b/chickadee/graphics/buffer.scm
index b18309e..dc3353b 100644
--- a/chickadee/graphics/buffer.scm
+++ b/chickadee/graphics/buffer.scm
@@ -122,16 +122,17 @@
(data buffer-data set-buffer-data!)
(stream-cache buffer-stream-cache))
-(set-record-type-printer! <buffer>
- (lambda (buffer port)
- (format port
- "#<buffer id: ~d name: ~s usage: ~s target: ~s length: ~d stride: ~s>"
- (buffer-id buffer)
- (buffer-name buffer)
- (buffer-usage buffer)
- (buffer-target buffer)
- (buffer-length buffer)
- (buffer-stride buffer))))
+(define (print-buffer buffer port)
+ (format port
+ "#<buffer id: ~d name: ~s usage: ~s target: ~s length: ~d stride: ~s>"
+ (buffer-id buffer)
+ (buffer-name buffer)
+ (buffer-usage buffer)
+ (buffer-target buffer)
+ (buffer-length buffer)
+ (buffer-stride buffer)))
+
+(set-record-type-printer! <buffer> print-buffer)
(define null-buffer
(%make-buffer 0 "null" 0 0 'vertex 'static #f #f))