From e5ce5ef05e133121eba4248f6eaf8868e6c410a6 Mon Sep 17 00:00:00 2001 From: Jeffery Myers Date: Tue, 7 Dec 2021 11:11:29 -0800 Subject: [PATCH] Cleanup render textures --- examples/effects/top_down_lights.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/examples/effects/top_down_lights.c b/examples/effects/top_down_lights.c index e52aad0b6..3c36ae263 100644 --- a/examples/effects/top_down_lights.c +++ b/examples/effects/top_down_lights.c @@ -360,6 +360,13 @@ int main(void) // De-Initialization //-------------------------------------------------------------------------------------- UnloadTexture(backgroundTexture); + UnloadRenderTexture(lightMask); + for (int i = 0; i < MAX_LIGHTS; i++) + { + if (Lights[i].Active) + UnloadRenderTexture(Lights[i].Mask); + } + CloseWindow(); // Close window and OpenGL context //--------------------------------------------------------------------------------------