ref: 770d4ada9a6a3baaf508d8e7db6e418d3c8695e3
parent: 9f2d15dc1690163915e18881128447e8b3731f9e
author: David <gek@katherine>
date: Mon Feb 22 07:29:34 EST 2021
Change- glBufferData now accepts null pointers which allows you to delete a buffer's data
--- a/src/arrays.c
+++ b/src/arrays.c
@@ -268,6 +268,7 @@
}
if(buf->data) gl_free(buf->data);
buf->data = NULL; buf->size = 0;
+ if(size == 0 || data == NULL) return; //Allow the user to delete buffer data with glBufferData.
buf->data = gl_malloc(size);
buf->size = size;
if(!(buf->data)){