summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorraysan5 <[email protected]>2018-12-29 00:00:52 +0100
committerraysan5 <[email protected]>2018-12-29 00:00:52 +0100
commita072385c6da533331661b25f6ed24fae0f8fd41f (patch)
tree92360ed7e88f18443afb50fde1a96448f2ae718c
parent414c3ee1f97c2c939d68b1b99a72feec1e29112a (diff)
downloadraylib-a072385c6da533331661b25f6ed24fae0f8fd41f.tar.gz
raylib-a072385c6da533331661b25f6ed24fae0f8fd41f.zip
Corrected issue on draws resetting
-rw-r--r--src/rlgl.h14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/rlgl.h b/src/rlgl.h
index 632c21f0..7776879a 100644
--- a/src/rlgl.h
+++ b/src/rlgl.h
@@ -3961,7 +3961,7 @@ static void DrawBuffersDefault(void)
if (eyesCount == 2) SetStereoView(eye, matProjection, matModelView);
#endif
- // Draw quads buffers
+ // Draw buffers
if (vertexData[currentBuffer].vCounter > 0)
{
// Set current shader and upload current MVP matrix
@@ -4047,10 +4047,14 @@ static void DrawBuffersDefault(void)
projection = matProjection;
modelview = matModelView;
- // Reset draws counter
- draws[0].mode = RL_QUADS;
- draws[0].vertexCount = 0;
- draws[0].textureId = defaultTextureId;
+ // Reset draws array
+ for (int i = 0; i < MAX_DRAWCALL_REGISTERED; i++)
+ {
+ draws[i].mode = RL_QUADS;
+ draws[i].vertexCount = 0;
+ draws[i].textureId = defaultTextureId;
+ }
+
drawsCounter = 1;
// Change to next buffer in the list