diff options
author | David Thompson <dthompson2@worcester.edu> | 2018-09-06 09:28:59 -0400 |
---|---|---|
committer | David Thompson <dthompson2@worcester.edu> | 2018-09-06 09:28:59 -0400 |
commit | 2f5c81df88025f1a68b1d981c355cfaf9d4c1fbd (patch) | |
tree | 427d9c69856e12fbd924d71a08d84258126aba3c | |
parent | 093e07a69add1c351ba757ec4a4dc006f81b3ac2 (diff) |
render: buffer: Stop using glBufferSubData when creating VBOs.
* chickadee/render/buffer.scm (make-buffer): Remove unnecessary call
to glBufferSubData and just use glBufferData to do it all.
-rw-r--r-- | chickadee/render/buffer.scm | 9 |
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)) |