summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--chickadee/render/buffer.scm9
1 files changed, 3 insertions, 6 deletions
diff --git a/chickadee/render/buffer.scm b/chickadee/render/buffer.scm
index 9726698..9635db6 100644
--- a/chickadee/render/buffer.scm
+++ b/chickadee/render/buffer.scm
@@ -170,13 +170,10 @@ used:
(gpu-state-set! *buffer-state* buffer)
(gl-buffer-data (buffer-target-gl buffer)
length
- %null-pointer
+ (if data
+ (bytevector->pointer data offset)
+ %null-pointer)
(buffer-usage-gl buffer))
- (when data
- (gl-buffer-sub-data (buffer-target-gl buffer)
- 0
- length
- (bytevector->pointer data offset)))
(gpu-state-set! *buffer-state* null-buffer)
buffer))