diff options
author | David Thompson <dthompson2@worcester.edu> | 2019-05-09 16:27:18 -0400 |
---|---|---|
committer | David Thompson <dthompson2@worcester.edu> | 2019-05-09 16:27:18 -0400 |
commit | 3d59d97515a8d73d8c4ea5ff6aeb8fb617ca7cda (patch) | |
tree | 45e9e0349e979205dc027c7d6a170027a6ec8c95 | |
parent | f316a93fc3813c4c04042485de12ab90985e6da8 (diff) |
render: buffer: Add buffer-mapped? procedure.
* chickadee/render/buffer.scm (buffer-mapped?): New procedure.
-rw-r--r-- | chickadee/render/buffer.scm | 5 |
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 |