EditorRenderer class

Base classes

template<typename Derived>
class RendererCore<EditorRenderer>

Constructors, destructors, conversion operators

EditorRenderer() defaulted
~EditorRenderer() defaulted

Public functions

void SetEngine(TrinyxEngine* engine)
Set the engine pointer for editor use (spawn handshake, scene load, etc.)
void PushImGuiEvent(const SDL_Event& event)
Feed an SDL event to ImGui from the main thread. Thread-safe.
auto EditorOwnsKeyboard() const -> bool
void SetEditorOwnsKeyboard(bool owns)
void ResizeEditorViewport(uint32_t width, uint32_t height)
Called by EditorContext when the "Viewport" panel resizes.
auto GetEditorViewportTexture() const -> VkDescriptorSet
ImGui texture handle for the editor's main viewport. Valid after OnPostStart.
void SetEditorViewportActive(bool active)
void AddViewport(WorldViewport* vp)
void RemoveViewport(WorldViewport* vp)
void AllocateViewportResources(WorldViewport* vp, uint32_t width, uint32_t height)
void FreeViewportResources(WorldViewport* vp)
void ResizeViewport(WorldViewport* vp, uint32_t width, uint32_t height)
Resize a PIE viewport's GPU resources if its panel size changed.

Function documentation

bool EditorRenderer::EditorOwnsKeyboard() const

True when the editor owns keyboard input (default). False when the viewport is active (right-click held) or Play mode is running.

void EditorRenderer::SetEditorViewportActive(bool active)

Enable or disable rendering the editor world. Call with false during PIE to avoid running the full compute pipeline for a world that isn't displayed.