ImGui
The ImGui plugin provides integration between Tellusim SDK and the ImGui immediate mode GUI system. It enables rendering ImGui interfaces within Tellusim application by handling input events, resource creation, and frame management. The plugin supports initialization, per-frame updates, and rendering through Tellusim graphics pipeline.
info
The plugin installs mouse and keyboard callbacks on the provided Window instance. Existing callbacks are chained and will be restored automatically when the plugin is cleared or destroyed.
#include <interface/imgui/include/TellusimImGui.h>
Example
This example demonstrates how to initialize and render an ImGui interface within Tellusim application:
// initialize ImGui
TS_ImGui imgui(window);
// ImGui style
ImGui::StyleColorsDark();
// main loop
window.run([&]() {
Window::update();
// render window
window.render();
// ImGui frame
imgui.frame(device, target);
// window target
target.begin();
{
// create command list
Command command = device.createCommand(target);
// ImGui render
imgui.render(command);
}
target.end();
// present window
window.present();
return true;
});