[gtk/wip/baedert/for-master] gl renderer: Don't flip when rendering to an fbo



commit cbaf5c733a758dccba4beabbeba4bf9187205ff1
Author: Timm Bäder <mail baedert org>
Date:   Tue Sep 29 19:21:49 2020 +0200

    gl renderer: Don't flip when rendering to an fbo

 gsk/gl/gskglrenderer.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
---
diff --git a/gsk/gl/gskglrenderer.c b/gsk/gl/gskglrenderer.c
index 1181ca0609..76e016f56a 100644
--- a/gsk/gl/gskglrenderer.c
+++ b/gsk/gl/gskglrenderer.c
@@ -3875,7 +3875,9 @@ gsk_gl_renderer_do_render (GskRenderer           *renderer,
                               viewport->origin.y + viewport->size.height,
                               ORTHO_NEAR_PLANE,
                               ORTHO_FAR_PLANE);
-  graphene_matrix_scale (&projection, 1, -1, 1);
+
+  if (fbo_id == 0) /* Our origin is in the lower left, fbos have it in the lower right */
+    graphene_matrix_scale (&projection, 1, -1, 1);
 
   removed = g_ptr_array_new ();
   gsk_gl_texture_atlases_begin_frame (self->atlases, removed);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]