mirror of
https://github.com/raysan5/raylib.git
synced 2025-09-22 03:08:24 +00:00
Free leaked allocations from render objects (#1302)
This commit is contained in:
@@ -4070,6 +4070,8 @@ static void UnloadShaderDefault(void)
|
|||||||
glDeleteShader(RLGL.State.defaultFShaderId);
|
glDeleteShader(RLGL.State.defaultFShaderId);
|
||||||
|
|
||||||
glDeleteProgram(RLGL.State.defaultShader.id);
|
glDeleteProgram(RLGL.State.defaultShader.id);
|
||||||
|
|
||||||
|
RL_FREE(RLGL.State.defaultShader.locs);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Load render batch
|
// Load render batch
|
||||||
@@ -4186,6 +4188,7 @@ static RenderBatch LoadRenderBatch(int numBuffers, int bufferElements)
|
|||||||
//batch.draws[i].RLGL.State.modelview = MatrixIdentity();
|
//batch.draws[i].RLGL.State.modelview = MatrixIdentity();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
batch.buffersCount = numBuffers; // Record buffer count
|
||||||
batch.drawsCounter = 1; // Reset draws counter
|
batch.drawsCounter = 1; // Reset draws counter
|
||||||
batch.currentDepth = -1.0f; // Reset depth value
|
batch.currentDepth = -1.0f; // Reset depth value
|
||||||
//--------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------
|
||||||
|
Reference in New Issue
Block a user