summaryrefslogtreecommitdiff
path: root/cogl/winsys
diff options
context:
space:
mode:
authorNeil Roberts <neil@linux.intel.com>2012-12-19 13:58:55 +0000
committerNeil Roberts <neil@linux.intel.com>2013-01-07 16:37:29 +0000
commitf1baa4d60f1b48ee431c4aa78735baba8ec1d50b (patch)
treed8faa7c559a51a9490154e26dc24a0a3ac2e1705 /cogl/winsys
parent015a47b77a2c993c10d98a6d42f2a99018831481 (diff)
downloadcogl-f1baa4d60f1b48ee431c4aa78735baba8ec1d50b.tar.gz
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> (cherry picked from commit 65da3f88af9c7b8d72758d116c2652aff68195c1)
Diffstat (limited to 'cogl/winsys')
-rw-r--r--cogl/winsys/cogl-winsys-glx.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/cogl/winsys/cogl-winsys-glx.c b/cogl/winsys/cogl-winsys-glx.c
index 839464f5..b24ebf19 100644
--- a/cogl/winsys/cogl-winsys-glx.c
+++ b/cogl/winsys/cogl-winsys-glx.c
@@ -1285,6 +1285,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++)
{