[cogl-fbo] Bring the gles code more in line with gl code
authorRobert Bragg <robert@linux.intel.com>
Tue, 15 Sep 2009 21:19:01 +0000 (22:19 +0100)
committerRobert Bragg <robert@linux.intel.com>
Mon, 2 Nov 2009 16:55:02 +0000 (16:55 +0000)
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.

clutter/cogl/cogl/driver/gles/cogl-fbo.c

index 34f6a59..41b5c6b 100644 (file)
@@ -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) );