ImGuiGlfwOpenGLBackend Class
ImGui backend for GLFW windowing and OpenGL 4.6 rendering. More...
Declaration
Base class
| class | ImGuiBackend |
|
Platform-agnostic interface for ImGui backend implementations. More... | |
Public Constructors Index
| ImGuiGlfwOpenGLBackend (const ImGuiGlfwOpenGLBackend &)=delete | |
| ImGuiGlfwOpenGLBackend (ImGuiGlfwOpenGLBackend &&other) noexcept=delete | |
| ImGuiGlfwOpenGLBackend (GLFWwindow *window) | |
|
Constructs and initializes the ImGui backend for GLFW+OpenGL. More... | |
Public Destructor Index
| ~ImGuiGlfwOpenGLBackend () override | |
|
Destructor; shuts down ImGui backend and releases resources. More... | |
Public Operators Index
| ImGuiGlfwOpenGLBackend & | operator= (const ImGuiGlfwOpenGLBackend &)=delete |
| ImGuiGlfwOpenGLBackend & | operator= (ImGuiGlfwOpenGLBackend &&other) noexcept=delete |
Public Member Functions Index
| void | renderDrawData (ImDrawData *drawData) override |
|
Renders ImGui draw data using OpenGL. More... | |
| void | newFrame () override |
|
Starts a new ImGui frame. More... | |
Private Member Functions Index
| void | shutdown () noexcept |
|
Shuts down the ImGui GLFW and OpenGL backend. More... | |
Private Member Attributes Index
| bool | initialized_ = false |
|
Indicates whether the backend has been successfully initialized. More... | |
Description
ImGui backend for GLFW windowing and OpenGL 4.6 rendering.
Initializes ImGui context, GLFW platform layer, and OpenGL renderer. This backend is non-copyable and non-movable due to resource ownership semantics.
Only one instance should exist per application. Creating multiple instances will throw a `std::runtime_error`.
Definition at line 29 of file ImGuiGlfwOpenGLBackend.ixx.
Public Constructors
ImGuiGlfwOpenGLBackend()
| delete |
Definition at line 67 of file ImGuiGlfwOpenGLBackend.ixx.
Reference ImGuiGlfwOpenGLBackend.
Referenced by ImGuiGlfwOpenGLBackend, ImGuiGlfwOpenGLBackend, operator= and operator=.
ImGuiGlfwOpenGLBackend()
| noexcept delete |
Definition at line 69 of file ImGuiGlfwOpenGLBackend.ixx.
Reference ImGuiGlfwOpenGLBackend.
ImGuiGlfwOpenGLBackend()
| inline explicit |
Constructs and initializes the ImGui backend for GLFW+OpenGL.
- Parameters
-
window GLFW window handle. Must be valid for the lifetime of this backend.
- Exceptions
-
std::runtime_error if ImGui context already exists or initialization fails.
Definition at line 79 of file ImGuiGlfwOpenGLBackend.ixx.
Public Destructor
~ImGuiGlfwOpenGLBackend()
| inline |
Destructor; shuts down ImGui backend and releases resources.
- See Also
shutdown()
Definition at line 129 of file ImGuiGlfwOpenGLBackend.ixx.
Public Operators
operator=()
| delete |
Definition at line 68 of file ImGuiGlfwOpenGLBackend.ixx.
Reference ImGuiGlfwOpenGLBackend.
operator=()
| noexcept delete |
Definition at line 70 of file ImGuiGlfwOpenGLBackend.ixx.
Reference ImGuiGlfwOpenGLBackend.
Public Member Functions
newFrame()
| inline virtual |
Starts a new ImGui frame.
Definition at line 118 of file ImGuiGlfwOpenGLBackend.ixx.
renderDrawData()
| inline virtual |
Renders ImGui draw data using OpenGL.
- Parameters
-
drawData Pointer to ImGui draw data.
Definition at line 111 of file ImGuiGlfwOpenGLBackend.ixx.
Private Member Functions
shutdown()
| inline noexcept |
Shuts down the ImGui GLFW and OpenGL backend.
Ensures proper cleanup of the ImGui context, OpenGL, and GLFW resources. After calling this method, the backend will no longer be initialized, and associated resources will be released.
This function is safe to call multiple times but has no effect if the backend is not currently initialized.
This method is noexcept and will not throw exceptions.
Definition at line 55 of file ImGuiGlfwOpenGLBackend.ixx.
Private Member Attributes
initialized_
|
Indicates whether the backend has been successfully initialized.
Tracks the initialization state of the ImGui backend to prevent multiple redundant initialization attempts and manage proper shutdown procedures.
Modified during initialization and shutdown processes.
Definition at line 41 of file ImGuiGlfwOpenGLBackend.ixx.
The documentation for this class was generated from the following file:
Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.15.0.