diff options
| author | Terry Nguyen <[email protected]> | 2020-07-09 11:42:20 -0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2020-07-09 20:42:20 +0200 |
| commit | 871cd1a76a41e9e7882ad51dbcd13e5f044a80a1 (patch) | |
| tree | 231bd09bfe05da658d9d5bf66622544150e7c4c6 /src | |
| parent | 00fda3be650ade80f1492105c2107a4ace6bc575 (diff) | |
| download | raylib-871cd1a76a41e9e7882ad51dbcd13e5f044a80a1.tar.gz raylib-871cd1a76a41e9e7882ad51dbcd13e5f044a80a1.zip | |
Free leaked allocations from render objects (#1302)
Diffstat (limited to 'src')
| -rw-r--r-- | src/rlgl.h | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -4070,6 +4070,8 @@ static void UnloadShaderDefault(void) glDeleteShader(RLGL.State.defaultFShaderId); glDeleteProgram(RLGL.State.defaultShader.id); + + RL_FREE(RLGL.State.defaultShader.locs); } // Load render batch @@ -4186,8 +4188,9 @@ static RenderBatch LoadRenderBatch(int numBuffers, int bufferElements) //batch.draws[i].RLGL.State.modelview = MatrixIdentity(); } - batch.drawsCounter = 1; // Reset draws counter - batch.currentDepth = -1.0f; // Reset depth value + batch.buffersCount = numBuffers; // Record buffer count + batch.drawsCounter = 1; // Reset draws counter + batch.currentDepth = -1.0f; // Reset depth value //-------------------------------------------------------------------------------------------- return batch; |
