Skip to content

text: centralize SoText2 raster preparation - #57

Open
tritao wants to merge 3 commits into
stack/drawlist-material-lightingfrom
stack/drawlist-text-foundation
Open

text: centralize SoText2 raster preparation#57
tritao wants to merge 3 commits into
stack/drawlist-material-lightingfrom
stack/drawlist-text-foundation

Conversation

@tritao

@tritao tritao commented Aug 16, 2026

Copy link
Copy Markdown
Collaborator

Purpose

Create the shared private text-preparation seam used by both renderers.

Commit 1: shared text preparation

  • centralize multiline SoText2 layout, UTF-8 traversal, justification, glyph positioning, and coverage generation;
  • keep glyph bitmap data as non-owning pointers into the existing glyph cache;
  • prepare raster data only after the normal LegacyGL visibility/culling decision;
  • preserve the historical out-of-bounds glyph warning;
  • add a native multiline LEFT/CENTER/RIGHT layout test;
  • add the LegacyGL text2_layout_basic visual baseline.

The LegacyGL path consumes this result with its existing glBitmap and glDrawPixels behavior. The retained path consumes the same result in the dependent raster/text implementation without duplicating layout.

Commit 2: GL gating split

Separate common shape gating and late GL setup from primitive-only triangle sorting:

  • preserve the original shouldGLRender() ordering;
  • let direct-rendered SoText2 use begin() and finish() while skipping only triangle sorting;
  • keep the focused direct-raster transparency and shape-gating regression tests.

Scope

This is a private LegacyGL-preserving text-preparation foundation. It adds no public planner/API, transparency ordering policy, or retained execution policy.

@tritao tritao changed the title stack/drawlist text foundation text: centralize SoText2 layout and glyph rasterization Aug 16, 2026
Comment thread src/shapenodes/SoText2.cpp Fixed
@tritao tritao changed the title text: centralize SoText2 layout and glyph rasterization text: centralize SoText2 raster preparation Aug 16, 2026
@tritao
tritao force-pushed the stack/drawlist-text-foundation branch 3 times, most recently from 12d4d80 to 86865bd Compare August 16, 2026 12:23
@tritao
tritao force-pushed the stack/drawlist-text-foundation branch 3 times, most recently from 3bd7f97 to 5389fdf Compare August 16, 2026 13:32
@tritao
tritao marked this pull request as ready for review August 16, 2026 14:04
@tritao
tritao force-pushed the stack/drawlist-text-foundation branch 2 times, most recently from 3833bb9 to f7c5e1b Compare August 16, 2026 15:59
@tritao
tritao force-pushed the stack/drawlist-text-foundation branch from f7c5e1b to 99bde08 Compare August 16, 2026 16:25
@tritao
tritao force-pushed the stack/drawlist-text-foundation branch from 99bde08 to 4f5058b Compare August 16, 2026 18:05
@tritao
tritao force-pushed the stack/drawlist-text-foundation branch from 4f5058b to 9282afa Compare August 16, 2026 18:22
@tritao
tritao force-pushed the stack/drawlist-text-foundation branch from 9282afa to 4b35b91 Compare August 16, 2026 18:47
@tritao
tritao force-pushed the stack/drawlist-text-foundation branch from 4b35b91 to 1708cde Compare August 16, 2026 19:41
@tritao
tritao force-pushed the stack/drawlist-text-foundation branch from 1708cde to 0fda8b4 Compare August 16, 2026 20:15
@tritao
tritao force-pushed the stack/drawlist-text-foundation branch from 0fda8b4 to 0921109 Compare August 16, 2026 20:20
@tritao
tritao force-pushed the stack/drawlist-text-foundation branch from 391d849 to 7bcd397 Compare August 17, 2026 14:13
@tritao
tritao force-pushed the stack/drawlist-text-foundation branch 6 times, most recently from cd4aae2 to 9f74d4c Compare August 17, 2026 17:11
@tritao
tritao force-pushed the stack/drawlist-text-foundation branch from 9f74d4c to d872588 Compare August 17, 2026 22:14
@tritao
tritao force-pushed the stack/drawlist-text-foundation branch from d872588 to 9bc8585 Compare August 17, 2026 22:27
@tritao
tritao force-pushed the stack/drawlist-text-foundation branch from 9bc8585 to 8a4c18c Compare August 17, 2026 23:56
@tritao
tritao force-pushed the stack/drawlist-text-foundation branch from 8a4c18c to f3fcbf6 Compare August 18, 2026 00:18
@tritao
tritao force-pushed the stack/drawlist-text-foundation branch 2 times, most recently from 5b07bd3 to f7d5352 Compare August 18, 2026 10:19
@tritao
tritao force-pushed the stack/drawlist-text-foundation branch from f7d5352 to b42bfdc Compare August 18, 2026 10:48
@tritao
tritao force-pushed the stack/drawlist-text-foundation branch from b42bfdc to 3391fe3 Compare August 18, 2026 14:41
tritao added 3 commits August 18, 2026 20:50
Keep the installed shouldGLRender() contract and preserve the historical LegacyGL order. Source-private begin/sort/finish helpers let direct-rendered SoText2 skip only primitive-cache triangle sorting while retaining common transparency and late BIGIMAGE, bump-map, and vertex-array handling.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants