ImGuiModule

ImGui implementation interface.

Overview

Typical use cases:

  • Defining interfaces for ImGui backend implementations

Header

<RaeptorCogs/GAPI/Common/Core/Internal/ImGuiModule.hpp>

Metadata

Author

Estorc

Version

v1.0

Copyright

Copyright (c) 2025 Estorc MIT License.

Classes

Classes

Class

Description

RaeptorCogs::GAPI::Common::ImGuiModule

ImGui implementation interface.

class ImGuiModule

ImGui implementation interface.

Provides an interface for ImGui backend implementations.

Subclassed by RaeptorCogs::GAPI::GL::ImGuiModule, RaeptorCogs::GAPI::Vulkan::ImGuiModule

Public Functions

ImGuiModule() = default

Default constructor.

virtual ~ImGuiModule() = default

Virtual destructor.

virtual void createImGuiContext(ImGuiContext *&imGuiContext, GLFWwindow *window) = 0

Create ImGui context for the given window.

Note

This is a pure virtual function and must be implemented by derived classes.

Parameters:
  • imGuiContext – Reference to ImGui context pointer to be created.

  • window – Pointer to the GLFW window.

virtual void NewImGuiFrame() = 0

Start a new ImGui frame.

Note

Must be called at the beginning of each frame when using ImGui.

virtual void RenderImGuiDrawData() = 0

Render ImGui draw data.

Note

Must be called to render ImGui draw data.

Protected Functions

inline void setPendingFrame(bool pending)
inline bool isPendingFrame() const

Private Members

bool pendingFrame = false