Files
XCEngine/docs/plan/xcui-subplans/Subplan-05_XCUI-ImGui-Transition-Backend.md

48 lines
1.3 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Subplan 05XCUI ImGui Transition Backend
目标:
- 在过渡阶段,用 ImGui 只做宿主窗口与 draw submission 容器。
- 让 XCUI 自己生成 draw list再由 ImGui backend 负责落屏。
负责人边界:
- 负责 `editor/src/XCUIBackend/` 或等价新目录。
- 负责 XCUI draw primitive 到 ImGui draw call 的映射。
- 不负责 XCUI tree、布局、样式的内部规则。
建议目录:
- `editor/src/XCUIBackend/`
- `editor/src/UI/` 中与 XCUI backend 直接相关的桥接代码
- `tests/Editor` 中 backend 相关测试
前置依赖:
- 需要 `Subplan 01` 给出稳定 draw data / frame submission 契约。
- 需要 `Subplan 03` 提供样式查询结果。
现在就可以先做的内容:
- 定义 `UIDrawList` / `UIDrawCommand` / `UIDrawText` / `UIDrawImage` / `UIDrawClip`
- 先做矩形、边框、文字、图片四类 primitive
- 设计 frame begin / submit / end 的 adapter 流程
- 写一个最小 demo panel用 XCUI draw list 通过 ImGui 显示
明确不做:
- 不做 RHI native backend
- 不做 docking 逻辑
交付物:
- XCUI -> ImGui 过渡 backend
- primitive 转换测试或快照测试
- 最小 editor 接入样例
验收标准:
- XCUI 逻辑层不直接依赖 ImGui API
- ImGui 只出现在 backend 适配层
- 可以渲染基础控件和文本