From c172619cdad216b9d496b01debd0c722cffab08e Mon Sep 17 00:00:00 2001 From: Caden Parker <36315399+Ne0nWinds@users.noreply.github.com> Date: Sun, 13 Sep 2026 15:55:43 -0500 Subject: [PATCH] Disable ShadowMap Texture Slot To Prevent Global State Leak (#6147) --- examples/shaders/shaders_shadowmap_rendering.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/examples/shaders/shaders_shadowmap_rendering.c b/examples/shaders/shaders_shadowmap_rendering.c index f8fd7d693..fcfcd8609 100644 --- a/examples/shaders/shaders_shadowmap_rendering.c +++ b/examples/shaders/shaders_shadowmap_rendering.c @@ -180,6 +180,9 @@ int main(void) DrawScene(cube, robot); // Draw the same exact things as we drew in the shadowmap! EndMode3D(); + rlActiveTextureSlot(textureActiveSlot); + rlDisableTexture(); + DrawText("Use the arrow keys to rotate the light!", 10, 10, 30, RED); DrawText("Shadows in raylib using the shadowmapping algorithm!", screenWidth - 280, screenHeight - 20, 10, GRAY);