[cogl] Bind the framebuffer before calling glDiscardFramebuffer
- From: Neil Roberts <nroberts src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [cogl] Bind the framebuffer before calling glDiscardFramebuffer
- Date: Wed, 13 Feb 2013 12:04:08 +0000 (UTC)
commit 37c390a5b33d4f65ff6c834e9be2f8de716635ee
Author: Neil Roberts <neil linux intel com>
Date: Mon Feb 11 17:12:31 2013 +0000
Bind the framebuffer before calling glDiscardFramebuffer
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.
Reviewed-by: Robert Bragg <robert linux intel com>
cogl/driver/gl/cogl-framebuffer-gl.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
---
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));
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]