From a7bc2ea1209134cdee5498482fee4c7a52a07740 Mon Sep 17 00:00:00 2001 From: Henrik Rydgard Date: Wed, 23 Jan 2013 08:31:29 +0100 Subject: [PATCH] Clearing FBOs on bind was a bit too aggressive an optimization. --- GPU/GLES/DisplayListInterpreter.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/GPU/GLES/DisplayListInterpreter.cpp b/GPU/GLES/DisplayListInterpreter.cpp index cbcf782c79..27bed9b51d 100644 --- a/GPU/GLES/DisplayListInterpreter.cpp +++ b/GPU/GLES/DisplayListInterpreter.cpp @@ -415,10 +415,12 @@ void GLES_GPU::SetRenderFrameBuffer() { gstate_c.textureChanged = true; fbo_bind_as_render_target(vfb->fbo); -// Tiled renderers benefit IMMENSELY from clearing an FBO before rendering -// to it. Let's hope this doesn't break too many things... #ifdef USING_GLES2 - glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT); + // Tiled renderers benefit IMMENSELY from clearing an FBO before rendering + // to it. Let's hope this doesn't break too many things... + // It did, will have to find a better solution like clearing only if this is + // the first time the buffer is bound on this frame. + // glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT); #endif glstate.viewport.set(0, 0, renderWidth_, renderHeight_); currentRenderVfb_ = vfb;