aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRay <raysan5@gmail.com>2018-01-26 11:49:00 +0100
committerRay <raysan5@gmail.com>2018-01-26 11:49:00 +0100
commit1d5fbef93db3f4ead04fd23885df1ddabe97b232 (patch)
treee6ad1013fada4571b6d7fa4e2a88330fd832f968 /src
parent779719f5dcabc170cd84e05b57ed03e9d87507d4 (diff)
downloadraylib-1d5fbef93db3f4ead04fd23885df1ddabe97b232.tar.gz
raylib-1d5fbef93db3f4ead04fd23885df1ddabe97b232.zip
Clear fbo for drawing
Just in case ClearBackground() is not used after BeginTextureMode(), it clears fbo to color defined by previous ClearBackground()
Diffstat (limited to 'src')
-rw-r--r--src/core.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/core.c b/src/core.c
index 4e94475c..54c440fd 100644
--- a/src/core.c
+++ b/src/core.c
@@ -949,6 +949,8 @@ void BeginTextureMode(RenderTexture2D target)
rlglDraw(); // Draw Buffers (Only OpenGL 3+ and ES2)
rlEnableRenderTexture(target.id); // Enable render target
+
+ rlClearScreenBuffers(); // Clear render texture buffers
// Set viewport to framebuffer size
rlViewport(0, 0, target.texture.width, target.texture.height);