summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--chickadee/render/buffer.scm5
1 files changed, 5 insertions, 0 deletions
diff --git a/chickadee/render/buffer.scm b/chickadee/render/buffer.scm
index 702423b..5285be3 100644
--- a/chickadee/render/buffer.scm
+++ b/chickadee/render/buffer.scm
@@ -39,6 +39,7 @@
make-streaming-buffer
buffer?
index-buffer?
+ buffer-mapped?
buffer-name
buffer-length
buffer-stride
@@ -197,6 +198,10 @@ never sent to the GPU."
for streaming data to the GPU every frame."
(make-buffer #f #:usage 'stream #:length length #:name name #:target target))
+(define (buffer-mapped? buffer)
+ "Return #t if buffer data has been mapped from GPU."
+ (if (buffer-data buffer) #t #f))
+
(define (map-buffer! buffer)
"Map the memory space for BUFFER from the GPU to the CPU, allowing
the vertex buffer to be updated with new vertex data. The