My Project
Loading...
Searching...
No Matches
GuiLayer Class Reference

Class responsible for managing the GUI layer using ImGui. Handles initialization, frame management, and rendering of the graphical user interface with DirectX11 and GLFW. More...

#include <ImGuiLayer.hpp>

Public Member Functions

 GuiLayer ()=default
 Default constructor.
 ~GuiLayer ()=default
 Destructor.
void Init (GLFWwindow *window, ID3D11Device *device, ID3D11DeviceContext *context, ID3D11RenderTargetView *rtv)
 Initializes the ImGui GUI layer with the required rendering context.
void BeginFrame ()
 Begins a new ImGui frame. Must be called before drawing any GUI elements.
void EndFrame ()
 Ends the ImGui frame and renders all GUI elements.
void Clear (float r, float g, float b, float a)
 Clears the render target with a specific color.

Detailed Description

Class responsible for managing the GUI layer using ImGui. Handles initialization, frame management, and rendering of the graphical user interface with DirectX11 and GLFW.

Constructor & Destructor Documentation

◆ GuiLayer()

GuiLayer::GuiLayer ( )
default

Default constructor.

◆ ~GuiLayer()

GuiLayer::~GuiLayer ( )
default

Destructor.

Member Function Documentation

◆ BeginFrame()

void GuiLayer::BeginFrame ( )

Begins a new ImGui frame. Must be called before drawing any GUI elements.

◆ Clear()

void GuiLayer::Clear ( float r,
float g,
float b,
float a )

Clears the render target with a specific color.

Parameters
rRed color component
gGreen color component
bBlue color component
aAlpha color component

◆ EndFrame()

void GuiLayer::EndFrame ( )

Ends the ImGui frame and renders all GUI elements.

◆ Init()

void GuiLayer::Init ( GLFWwindow * window,
ID3D11Device * device,
ID3D11DeviceContext * context,
ID3D11RenderTargetView * rtv )

Initializes the ImGui GUI layer with the required rendering context.

Parameters
windowPointer to the GLFW window
deviceDirectX11 device used for rendering
contextDirectX11 device context
rtvRender target view used for GUI rendering

The documentation for this class was generated from the following file: