浏览代码

Add color clearing on Fb::bind() (see love issue #17, comment #5)

Matthias Richter 15 年之前
父节点
当前提交
b734a39f4d
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      src/modules/graphics/opengl/Fbo.cpp

+ 1 - 0
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);
 	}