summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Thompson <dthompson2@worcester.edu>2018-12-04 21:49:38 -0500
committerDavid Thompson <dthompson2@worcester.edu>2018-12-05 13:57:06 -0500
commit36c24d256316e9ccc774cff19117c592a7d12fca (patch)
treed7d39f1b757dfac778299086b40c78399c219c15
parent9834292c10a3e9e0aa3c18b57d0bde28b3c9aecd (diff)
render: buffer: Add support for int and double component types.
* chickadee/render/buffer.scm (component-type-size, typed-buffer-type-gl): Add int and double cases.
-rw-r--r--chickadee/render/buffer.scm8
1 files changed, 6 insertions, 2 deletions
diff --git a/chickadee/render/buffer.scm b/chickadee/render/buffer.scm
index 5d13c2e..cf0a79b 100644
--- a/chickadee/render/buffer.scm
+++ b/chickadee/render/buffer.scm
@@ -283,8 +283,10 @@ vertex buffer data back to the GPU."
('unsigned-byte 1)
('short 2)
('unsigned-short 2)
+ ('int 4)
('unsigned-int 4)
- ('float 4)))
+ ('float 4)
+ ('double 8)))
(define* (make-streaming-typed-buffer type component-type length #:key
(name "anonymous")
@@ -338,8 +340,10 @@ which attributes advance when rendering multiple instances."
('unsigned-byte (data-type unsigned-byte))
('short (data-type short))
('unsigned-short (data-type unsigned-short))
+ ('int (data-type int))
('unsigned-int (data-type unsigned-int))
- ('float (data-type float))))
+ ('float (data-type float))
+ ('double (data-type double))))
(define (map-typed-buffer! typed-buffer)
(map-buffer! (typed-buffer->buffer typed-buffer)))