Fixing depth clashing and struct padding

This commit is contained in:
Dynamitos committed 2026-11-05 22:31:04 +01:00
1 parent ff2e4e642d
commit 3317705d9c
4 files changed
+55 -12

No files matched your search

+4 -1
View File
@@ -93,7 +93,10 @@ class Text : public Element {
.position = pos + Vector2(g.position.x, g.position.y),
.dimensions = Vector2(g.dimensions.x, g.dimensions.y),
.z = style.z,
.level = level,
// level+1: a glyph must sit strictly in FRONT of its parent's own quad
// (same render.level => same depth value => GREATER-or-EQUAL test fails
// against the parent's already-written depth, and the glyph is culled).
.level = level + 1,
.element = this,
.uvOffset = g.uvOffset,
.uvSize = g.uvSize,