Commit aa922f07 authored by Timm Bäder's avatar Timm Bäder 🤔
Browse files

gl renderer: Pass correct matrix category when rendering offscreen

We can't just pretend we have an identity matrix when we are actually
scaling. This fixes the node editor sometimes not drawing things when
rendering to a texture. We were mistakenly discaring render nodes
because the bounds transformation was wrong.
parent 7e502d07
Pipeline #83019 passed with stages
in 26 minutes and 45 seconds
......@@ -2707,7 +2707,7 @@ add_offscreen_ops (GskGLRenderer *self,
int render_target;
int prev_render_target;
RenderOp op;
graphene_matrix_t identity;
graphene_matrix_t modelview;
graphene_matrix_t prev_projection;
graphene_rect_t prev_viewport;
graphene_matrix_t item_proj;
......@@ -2762,15 +2762,16 @@ add_offscreen_ops (GskGLRenderer *self,
(bounds->origin.y + bounds->size.height) * scale,
graphene_matrix_scale (&item_proj, 1, -1, 1);
graphene_matrix_init_identity (&identity);
graphene_matrix_scale (&identity, scale, scale, 1);
graphene_matrix_init_scale (&modelview, scale, scale, 1);
prev_render_target = ops_set_render_target (builder, render_target);
/* Clear since we use this rendertarget for the first time */
op.op = OP_CLEAR;
ops_add (builder, &op);
prev_projection = ops_set_projection (builder, &item_proj);
ops_set_modelview (builder, &identity, GSK_TRANSFORM_CATEGORY_IDENTITY);
ops_set_modelview (builder, &modelview,
prev_viewport = ops_set_viewport (builder,
&GRAPHENE_RECT_INIT (bounds->origin.x * scale,
bounds->origin.y * scale,
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment