Conversation
Document the BYOR (Bring Your Own Renderer) architecture inspired by Dear ImGui's backend system. The library outputs draw commands; users implement rendering however they want. Key design elements: - Draw pipeline: widget calls → layout compute → draw generation → backend - DrawPrimitive union: fill_rect, stroke_rect, text, line, vertices - DrawCommand with clip_rect, layer, and widget_id for z-ordering - DrawList with clip/layer stack management - DrawData output structure for backends - RenderBackend vtable interface - WidgetRenderInfo for storing widget data during UI function calls - Example backends: SDL+OpenGL and Software rasterizer (embedded) - Memory budget analysis: ~3.6 KB for 32KB embedded targets (11%) - Planned backends: SDL, Software, WebGPU, Metal, Vulkan
bd59d5a to
b02a3db
Compare
dgellow
pushed a commit
that referenced
this pull request
Dec 5, 2025
Add CLAUDE.md rule #6: "Design the Complete Solution" - Never design incomplete solutions or defer hard problems - Design for FULL requirements from the start - Include support for hard cases in interface even if impl comes later - Goal: complete design, incremental implementation Update text rendering README.md: - Replace "Phase 1/2/3" with "Implementation Order" - Replace "Deferred to Phase 3" with explicit scope decisions: - Out of Scope: SDF, subpixel, variable fonts (with reasons) - In Design, Pending: bidi, shaping, color emoji (interface ready) - Add "Complete System Architecture" diagram showing all providers - Update Bidi section: "Interface fully supports bidi" not "limitation"
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds comprehensive Draw System documentation to DESIGN.md, establishing the Bring Your Own Renderer (BYOR) architecture inspired by Dear ImGui's backend system.
Design Highlights
Key Data Structures
DrawPrimitiveDrawCommandDrawListDrawDataRenderBackendMemory Budget (Embedded)
~3.6 KB for 32 widgets on 32KB targets (11% of budget), with immediate rendering mode option for extreme constraints.
Planned Backends