cad-editor/src/scene/view
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Hakan Seven 896b6c385c feat(text): render TEXT as SDF quads behind OCS_TEXT_SDF flag
Wires the SDF glyph atlas into the render loop end-to-end for top-level
TEXT entities, gated by the OCS_TEXT_SDF env var so the default path is
unchanged. Verified rendering on a real drawing: glyph quads land exactly
over the existing stroke text (position, size, rotation), confirming the
atlas → shader → pipeline → screen path and the RTE / UV math.

- text::text_run_placement — extracted from to_truck (behaviour-preserved)
  so the stroke and SDF-quad paths compute an identical run placement.
- sdf_atlas::text_atlas — process-wide GlyphAtlas (Mutex/OnceLock), shared
  by the collector (bakes glyphs) and the GPU upload (reads texels).
- Scene::sdf_text_vertices — collects per-glyph TextVertex for the frame's
  TEXT entities via layout_glyph_quads + push_glyph_vertices. Empty unless
  OCS_TEXT_SDF is set.
- ViewportData.text_verts + Pipeline text_pipeline/atlas/vbuf, upload_text
  (rebuilds the R8 atlas texture when it grows), and a text render pass
  drawn over the wires.

Still additive over the stroke text; only top-level TEXT is wired (MTEXT,
attributes, and block-internal text are next), and the collector re-runs
per frame (vertex caching by geometry epoch is a follow-up).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-06 23:02:34 +03:00
..
camera.rs fix(camera): orbit target in f64 to avoid extent-scale jitter 2026-07-05 03:26:07 +03:00
dispatch.rs feat(properties): show Thickness in the General group 2026-07-03 16:51:05 +03:00
mod.rs refactor(scene): group modules into role-based subfolders 2026-06-16 11:33:46 +03:00
render.rs feat(text): render TEXT as SDF quads behind OCS_TEXT_SDF flag 2026-07-06 23:02:34 +03:00
transform.rs wip(f64): convert command layer to DVec3 (in progress) 2026-06-24 03:32:11 +03:00
viewport_pane.rs refactor(viewport): migrate model-space tiling to iced pane_grid 2026-06-27 11:50:11 +03:00