diff --git a/clutter/cogl/cogl/driver/gl/cogl-fbo.c b/clutter/cogl/cogl/driver/gl/cogl-fbo.c index 1bd88aeea..99315e6b0 100644 --- a/clutter/cogl/cogl/driver/gl/cogl-fbo.c +++ b/clutter/cogl/cogl/driver/gl/cogl-fbo.c @@ -225,16 +225,6 @@ cogl_set_draw_buffer (CoglBufferTarget target, CoglHandle offscreen) /* Bind offscreen framebuffer object */ GE( glBindFramebufferEXT (GL_FRAMEBUFFER_EXT, fbo->gl_handle) ); GE( glColorMask (GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE) ); - - /* Some implementation require a clear before drawing - to an fbo. Luckily it is affected by scissor test. */ - /* FIXME: test where exactly this is needed end whether - a glClear with 0 argument is enough */ - GE( glPushAttrib (GL_SCISSOR_BIT) ); - GE( glScissor (0,0,0,0) ); - GE( glEnable (GL_SCISSOR_TEST) ); - GE( glClear (GL_COLOR_BUFFER_BIT) ); - GE( glPopAttrib () ); } else if (target & COGL_WINDOW_BUFFER) { diff --git a/clutter/cogl/cogl/driver/gles/cogl-fbo.c b/clutter/cogl/cogl/driver/gles/cogl-fbo.c index 0b1006970..34f6a5946 100644 --- a/clutter/cogl/cogl/driver/gles/cogl-fbo.c +++ b/clutter/cogl/cogl/driver/gles/cogl-fbo.c @@ -157,9 +157,6 @@ cogl_set_draw_buffer (CoglBufferTarget target, CoglHandle offscreen) if (target == COGL_OFFSCREEN_BUFFER) { - GLboolean scissor_enabled; - GLint scissor_box[4]; - /* Make sure it is a valid fbo handle */ if (!cogl_is_offscreen (offscreen)) return; @@ -197,22 +194,6 @@ cogl_set_draw_buffer (CoglBufferTarget target, CoglHandle offscreen) /* Bind offscreen framebuffer object */ GE( glBindFramebuffer (GL_FRAMEBUFFER, fbo->gl_handle) ); GE( glColorMask (GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE) ); - - /* Some implementation require a clear before drawing - to an fbo. Luckily it is affected by scissor test. */ - /* FIXME: test where exactly this is needed end whether - a glClear with 0 argument is enough */ - - scissor_enabled = glIsEnabled (GL_SCISSOR_TEST); - GE( glGetIntegerv (GL_SCISSOR_BOX, scissor_box) ); - GE( glScissor (0, 0, 0, 0) ); - GE( glEnable (GL_SCISSOR_TEST) ); - GE( glClear (GL_COLOR_BUFFER_BIT) ); - if (!scissor_enabled) - glDisable (GL_SCISSOR_TEST); - glScissor (scissor_box[0], scissor_box[1], - scissor_box[2], scissor_box[3]); - } else if (target & COGL_WINDOW_BUFFER) {