ImGuiRenderable

Entity → Visual → Renderable → ceramic.ImGuiRenderable (Class)

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.

Geometry and scissors are pushed in logical coordinates (the backend applies density to both). ImGui itself is laid out either in native screen points (ImGuiSystem.nativeScreen, the default) or directly in logical coordinates: an affine transform, refreshed each frame, maps ImGui coordinates to logical ones. Vertex colors are premultiplied CPU-side to match ceramic's premultiplied-alpha compositing.

Instance Members

imgui
computeUsedTextures(): Void

imgui
render(draw: backend.Draw): Void
Name Type
draw backend.Draw

imgui
new(): Void

Private Members

imgui
tA: Float

imgui
tB: Float

imgui
tC: Float

imgui
tD: Float

imgui
tTX: Float

imgui
tTY: Float

imgui
updateImGuiTransform(): Void

imgui
pushCommand(draw: backend.Draw, multiTexture: Bool, vtx: cpp.RawPointer<imgui.ImDrawVert>, idx: cpp.RawPointer<cpp.UInt16>, vtxOffset: Int, idxOffset: Int, elemCount: Int): Void

Push 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

imgui
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()