Corrected issue on draws resetting

This commit is contained in:
raysan5 2018-12-29 00:00:52 +01:00
parent 414c3ee1f9
commit a072385c6d

View file

@ -3961,7 +3961,7 @@ static void DrawBuffersDefault(void)
if (eyesCount == 2) SetStereoView(eye, matProjection, matModelView); if (eyesCount == 2) SetStereoView(eye, matProjection, matModelView);
#endif #endif
// Draw quads buffers // Draw buffers
if (vertexData[currentBuffer].vCounter > 0) if (vertexData[currentBuffer].vCounter > 0)
{ {
// Set current shader and upload current MVP matrix // Set current shader and upload current MVP matrix
@ -4047,10 +4047,14 @@ static void DrawBuffersDefault(void)
projection = matProjection; projection = matProjection;
modelview = matModelView; modelview = matModelView;
// Reset draws counter // Reset draws array
draws[0].mode = RL_QUADS; for (int i = 0; i < MAX_DRAWCALL_REGISTERED; i++)
draws[0].vertexCount = 0; {
draws[0].textureId = defaultTextureId; draws[i].mode = RL_QUADS;
draws[i].vertexCount = 0;
draws[i].textureId = defaultTextureId;
}
drawsCounter = 1; drawsCounter = 1;
// Change to next buffer in the list // Change to next buffer in the list