From 8e219272e5ab1dcc311ed9317cf98918bd5a7fa3 Mon Sep 17 00:00:00 2001 From: GoblinBob Date: Wed, 7 Nov 2018 21:06:00 +0100 Subject: [PATCH] Update core.c Some projects need the buffer to not be empited when drawing to the render texture. I would suggest making maybe a variation of the function if you'd like to keep backwards compatibility, maybe like: BeginTextureModeNoClear() ? --- src/core.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/core.c b/src/core.c index 5f12fb72..7d64ae27 100644 --- a/src/core.c +++ b/src/core.c @@ -1170,7 +1170,9 @@ void BeginTextureMode(RenderTexture2D target) rlEnableRenderTexture(target.id); // Enable render target - rlClearScreenBuffers(); // Clear render texture buffers + // Some projects need the buffer to not be empited when drawing to + // the render texture. + //rlClearScreenBuffers(); // Clear render texture buffers // Set viewport to framebuffer size rlViewport(0, 0, target.texture.width, target.texture.height);