ImGuiPlugin
ceramic.ImGuiPlugin (Class)
Plugin that integrates Dear ImGui (immediate mode GUI) into Ceramic.
Dear ImGui is a bloat-free graphical user interface library for C++. It outputs optimized vertex buffers that you can render anytime in your 3D-pipeline enabled application. It is fast, portable, renderer agnostic and self-contained (no external dependencies).
This plugin provides:
- Automatic initialization of ImGui context
- Platform-specific backends (C++/OpenGL for native, JavaScript/WebGL for web)
- Optional custom font loading via
imgui_fontdefine - Frame lifecycle management through ImGuiSystem
Usage:
// In ceramic.yml:
plugins:
- imgui
// Optionally specify a custom font (raw TTF bytes; use a `.bin` suffix
// so the font plugin does not transform the file into a bitmap font):
defines:
imgui_font: "MyFont.ttf.bin"
imgui_font_fallback: "MyFallbackFont.ttf.bin" # optional, merged glyphs (e.g. CJK)
// In your code:
import imguicpp.ImGui; // or imguijs.ImGui for web
// ImGui calls are made between newFrame() and endFrame()
// which are handled automatically by ImGuiSystem
override function update(delta:Float):Void {
ImGui.begin("My Window");
ImGui.text("Hello from ImGui!");
ImGui.end();
}
See: ImGuiSystem, https://github.com/ocornut/imgui
Private Members
Plugin initialization entry point. Called automatically when the plugin is loaded. Sets up font loading (if specified) and registers the ImGui loader.
Initializes the ImGui system. This is registered as a loader to ensure ImGui is ready before the app starts.
| Name | Type | Description |
|---|---|---|
done |
Function | Callback to invoke when ImGui is fully initialized |
Metadata
| Name | Parameters |
|---|---|
:access |
ceramic.App |