Skip to content

Engine → Renderer

imgui_renderer.h

The Dear ImGui render backend. Compiled only in editor builds (CONJURE_BUILD_EDITOR, never in Distribution); the header is empty otherwise so it still compiles alone. The ImGui context belongs to engine::imgui_layer: this class only draws, and declares itself in the context (attach_to_current_context) once the layer has created it. Colour (option B): on an RGBA8_UNORM target (the editor's swapchain) ImGui's display-referred vertex colours are written as authored and blend in sRGB space; a draw that samples a texture holding linear values, an *_SRGB one (a render target, a thumbnail) or a float one (an HDR render target or texture), encodes the texel to sRGB in the shader. On an *_SRGB target nothing is converted. With ImGui >= 1.92 it implements the texture protocol (ImGuiBackendFlags_RendererHasTextures); with the pinned 1.91 it uploads the font atlas once and again when the atlas changed: a new pixel pointer, a new size, a TexID that is not the backend's (io.Fonts->SetTexID(0) after a rebuild), or an explicit invalidate_font_atlas(). The owner of the context must do one of the last two after io.Fonts->Build(): a rebuilt atlas of the same size can land at the same address.

Structs

File Description
imgui_render_stats Statistics of the last render().
imgui_renderer::create_tag

Classes

File Description
imgui_renderer

Type Aliases

imgui_texture_resolver

using imgui_texture_resolver = std::function<nvrhi::ITexture *(gpu_texture_id)>;

Resolves a renderer texture id to its NVRHI texture (nullptr when stale); supplied by the renderer.

Forward Declarations

ICommandList

class ICommandList;

IFramebuffer

class IFramebuffer;

ImDrawData

struct ImDrawData;

imgui_renderer::impl

struct impl;

ITexture

class ITexture;