From 6b2ff320cab3404a532e194cae853ee9823568f7 Mon Sep 17 00:00:00 2001 From: Robert Bragg Date: Tue, 15 Sep 2009 22:19:01 +0100 Subject: [PATCH] [cogl-fbo] Bring the gles code more in line with gl code Over time the two cogl-fbo.c files have needlessly diverged as bug fixes or cleanups went into one version but not the other. This tries to bring them back in line with each other. It should actually be simple enough to move cogl-fbo.c to be a common file, and simply not build it for GLES 1.1, so maybe I'll follow up with such a patch soon. --- cogl/driver/gles/cogl-fbo.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/cogl/driver/gles/cogl-fbo.c b/cogl/driver/gles/cogl-fbo.c index 34f6a5946..41b5c6b0c 100644 --- a/cogl/driver/gles/cogl-fbo.c +++ b/cogl/driver/gles/cogl-fbo.c @@ -152,6 +152,8 @@ cogl_set_draw_buffer (CoglBufferTarget target, CoglHandle offscreen) _COGL_GET_CONTEXT (ctx, NO_RETVAL); + _cogl_journal_flush (); + g_assert (ctx->draw_buffer_stack != NULL); draw_buffer = ctx->draw_buffer_stack->data; @@ -186,10 +188,16 @@ cogl_set_draw_buffer (CoglBufferTarget target, CoglHandle offscreen) } /* Setup new viewport and matrices */ +<<<<<<< HEAD:clutter/cogl/cogl/driver/gles/cogl-fbo.c GE( glViewport (0, 0, fbo->width, fbo->height) ); _cogl_matrix_stack_translate (ctx->modelview_stack, -1.0f, -1.0f, 0.0f); _cogl_matrix_stack_scale (ctx->modelview_stack, 2.0f / fbo->width, 2.0f / fbo->height, 1.0f); +======= + cogl_viewport (fbo->width, fbo->height); + _cogl_current_matrix_translate (-1.0f, -1.0f, 0.0f); + _cogl_current_matrix_scale (2.0f / fbo->width, 2.0f / fbo->height, 1.0f); +>>>>>>> c3e471c... [cogl-fbo] Bring the gles code more in line with gl code:clutter/cogl/cogl/driver/gles/cogl-fbo.c /* Bind offscreen framebuffer object */ GE( glBindFramebuffer (GL_FRAMEBUFFER, fbo->gl_handle) );