[cogl] Clear the scissor before calling glBlitFramebuffer in swap_region
- From: Neil Roberts <nroberts src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [cogl] Clear the scissor before calling glBlitFramebuffer in swap_region
- Date: Mon, 7 Jan 2013 16:36:23 +0000 (UTC)
commit 65da3f88af9c7b8d72758d116c2652aff68195c1
Author: Neil Roberts <neil linux intel com>
Date: Wed Dec 19 13:58:55 2012 +0000
Clear the scissor before calling glBlitFramebuffer in swap_region
glBlitFramebuffer is affected by the scissor so we need to ensure
there is an empty clip flushed before using it. This is similar to
what is done in _cogl_blit_framebuffer().
https://bugzilla.gnome.org/show_bug.cgi?id=690451
Reviewed-by: Robert Bragg <robert linux intel com>
Tested-by: Aaron Plattner <aplattner nvidia com>
cogl/winsys/cogl-winsys-glx.c | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/cogl/winsys/cogl-winsys-glx.c b/cogl/winsys/cogl-winsys-glx.c
index 661863d..e7b91c2 100644
--- a/cogl/winsys/cogl-winsys-glx.c
+++ b/cogl/winsys/cogl-winsys-glx.c
@@ -1320,6 +1320,15 @@ _cogl_winsys_onscreen_swap_region (CoglOnscreen *onscreen,
int i;
/* XXX: checkout how this state interacts with the code to use
* glBlitFramebuffer in Neil's texture atlasing branch */
+
+ /* glBlitFramebuffer is affected by the scissor so we need to
+ * ensure we have flushed an empty clip stack to get rid of it.
+ * We also mark that the clip state is dirty so that it will be
+ * flushed to the correct state the next time something is
+ * drawn */
+ _cogl_clip_stack_flush (NULL, framebuffer);
+ context->current_draw_buffer_changes |= COGL_FRAMEBUFFER_STATE_CLIP;
+
context->glDrawBuffer (GL_FRONT);
for (i = 0; i < n_rectangles; i++)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]