From b734a39f4dcb33315a7b4a705731ef0f089fbbea Mon Sep 17 00:00:00 2001 From: Matthias Richter Date: Wed, 11 Aug 2010 21:10:31 +0200 Subject: [PATCH] Add color clearing on Fb::bind() (see love issue #17, comment #5) --- src/modules/graphics/opengl/Fbo.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/modules/graphics/opengl/Fbo.cpp b/src/modules/graphics/opengl/Fbo.cpp index 82ab67c1a..4164289ad 100644 --- a/src/modules/graphics/opengl/Fbo.cpp +++ b/src/modules/graphics/opengl/Fbo.cpp @@ -94,6 +94,7 @@ namespace opengl glPushAttrib(GL_VIEWPORT_BIT | GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); glBindFramebuffer(GL_FRAMEBUFFER, fbo); glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); + glClearColor(.0f, .0f, .0f, .0f); glViewport(0, 0, width, height); }