diff options
author | kleonc <9283098+kleonc@users.noreply.github.com> | 2023-07-14 02:18:05 +0200 |
---|---|---|
committer | kleonc <9283098+kleonc@users.noreply.github.com> | 2023-07-14 02:18:05 +0200 |
commit | b7e5ea8a398b9b30e5e5c0a984559c9e0e3df491 (patch) | |
tree | 99d51ad92d2910c8d7d016c1ef3b02ae95d52d33 /servers | |
parent | 60f3b7967cbd00b4e1f52d33d372646f7bec02f6 (diff) | |
download | redot-engine-b7e5ea8a398b9b30e5e5c0a984559c9e0e3df491.tar.gz |
Update Y-sort position of the first item in the sorted subtree
Diffstat (limited to 'servers')
-rw-r--r-- | servers/rendering/renderer_canvas_cull.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/servers/rendering/renderer_canvas_cull.cpp b/servers/rendering/renderer_canvas_cull.cpp index 2cb7f32cc3..6e489671c9 100644 --- a/servers/rendering/renderer_canvas_cull.cpp +++ b/servers/rendering/renderer_canvas_cull.cpp @@ -306,12 +306,14 @@ void RendererCanvasCull::_cull_canvas_item(Item *p_canvas_item, const Transform2 child_item_count = ci->ysort_children_count + 1; child_items = (Item **)alloca(child_item_count * sizeof(Item *)); + ci->ysort_xform = ci->xform.affine_inverse(); + ci->ysort_pos = Vector2(); + ci->ysort_modulate = Color(1, 1, 1, 1); + ci->ysort_index = 0; ci->ysort_parent_abs_z_index = parent_z; child_items[0] = ci; int i = 1; _collect_ysort_children(ci, Transform2D(), p_material_owner, Color(1, 1, 1, 1), child_items, i, p_z); - ci->ysort_xform = ci->xform.affine_inverse(); - ci->ysort_modulate = Color(1, 1, 1, 1); SortArray<Item *, ItemPtrSort> sorter; sorter.sort(child_items, child_item_count); |