ImGuiRenderable
Renders Dear ImGui's draw data THROUGH ceramic's own 2D pipeline - no imgui_impl_* platform renderer involved, which is what makes the plugin cross-backend (clay native, clay web, unity share this exact code).
A Renderable gets the concrete backend.Draw in render(): ImGui's
per-command model (scissor rect + texture + a vertex/index slice) maps 1:1
onto enableScissor / bindTexture / putPos... / flush. The engine's
drawRenderable bracket flushes and dirties the 2D state afterwards, so the
regular pipeline resumes untouched.
Coordinates are logical (ImGui's DisplaySize is ceramic's logical screen
size; the backend applies density to both geometry and scissor). Vertex
colors are premultiplied CPU-side to match ceramic's premultiplied-alpha
compositing.
Instance Members
| Name | Type |
|---|---|
draw |
backend.Draw |
Private Members
pushCommand(draw: backend.Draw, multiTexture: Bool, vtx: cpp.RawPointer<imgui.ImDrawVert>, idx: cpp.RawPointer<cpp.UInt16>, vtxOffset: Int, idxOffset: Int, elemCount: Int): VoidPush one draw command's geometry. The command's indices reference a window of the list's vertex buffer: we locate that [min..max] window, push those vertices once, and rebase the indices. Windows larger than the batcher's capacity fall back to per-triangle pushes.
| Name | Type |
|---|---|
draw |
backend.Draw |
multiTexture |
Bool |
vtx |
cpp.RawPointer<imgui.ImDrawVert> |
idx |
cpp.RawPointer<cpp.UInt16> |
vtxOffset |
Int |
idxOffset |
Int |
elemCount |
Int |
putVertex(draw: backend.Draw, multiTexture: Bool, vtx: cpp.RawPointer<imgui.ImDrawVert>, v: Int): Void| Name | Type |
|---|---|
draw |
backend.Draw |
multiTexture |
Bool |
vtx |
cpp.RawPointer<imgui.ImDrawVert> |
v |
Int |
Metadata
| Name | Parameters |
|---|---|
:build |
ceramic.macros.EntityMacro.buildForCompletion() |
:autoBuild |
ceramic.macros.EntityMacro.buildForCompletion() |
:build |
tracker.macros.EventsMacro.build() |
:autoBuild |
tracker.macros.EventsMacro.build() |