[Cogl] [PATCH 2/2] Bind the framebuffer before calling glDiscardFramebuffer

Robert Bragg robert at sixbynine.org
Tue Feb 12 17:46:23 PST 2013


This looks good to land to me:

Reviewed-by: Robert Bragg <robert at linux.intel.com>

thanks,
- Robert

On Mon, Feb 11, 2013 at 5:36 PM, Neil Roberts <neil at linux.intel.com> wrote:
> This patch just adds a call to _cogl_framebuffer_flush_state to ensure
> the correct framebuffer is bound before discarding its buffers.
> Previously it would presumably just discard the buffers of whatever
> framebuffer happened to be used last.
> ---
>  cogl/driver/gl/cogl-framebuffer-gl.c | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/cogl/driver/gl/cogl-framebuffer-gl.c b/cogl/driver/gl/cogl-framebuffer-gl.c
> index abd3b4a..1e7d1b7 100644
> --- a/cogl/driver/gl/cogl-framebuffer-gl.c
> +++ b/cogl/driver/gl/cogl-framebuffer-gl.c
> @@ -1033,6 +1033,9 @@ _cogl_framebuffer_gl_discard_buffers (CoglFramebuffer *framebuffer,
>              attachments[i++] = GL_STENCIL_ATTACHMENT;
>          }
>
> +      _cogl_framebuffer_flush_state (framebuffer,
> +                                     framebuffer,
> +                                     COGL_FRAMEBUFFER_STATE_BIND);
>        GE (ctx, glDiscardFramebuffer (GL_FRAMEBUFFER, i, attachments));
>      }
>  }
> --
> 1.7.11.3.g3c3efa5
>
> _______________________________________________
> Cogl mailing list
> Cogl at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/cogl


More information about the Cogl mailing list