WoW Model Viewer
Your premiere tool for viewing, equipping and animating World of Warcraft models.
Loading...
Searching...
No Matches
ImGuiLayer Class Reference

#include <ImGuiLayer.h>

Public Member Functions

 ImGuiLayer ()=default
 
 ~ImGuiLayer ()=default
 
 ImGuiLayer (const ImGuiLayer &)=delete
 
ImGuiLayeroperator= (const ImGuiLayer &)=delete
 
bool init (GLFWwindow *window, float dpiScale, UIState *uiState)
 
void discoverFonts (std::vector< FontEntry > &fonts, int &selectedFont)
 
void buildFontAtlas (const std::vector< FontEntry > &fonts, int selectedFont, float fontSize, float dpiScale)
 Build (or rebuild) the font atlas from the currently selected font.
 
void rebuildFontAtlasIfDirty (bool &fontsDirty, const std::vector< FontEntry > &fonts, int selectedFont, float fontSize, float dpiScale)
 If the fontsDirty flag is set, rebuild the atlas and clear the flag.
 
void beginFrame ()
 Start a new ImGui frame (backend NewFrame + ImGui::NewFrame).
 
void endFrame (const AppWindow &window)
 
void shutdown ()
 Shut down ImGui backends and destroy the context.
 

Detailed Description

Definition at line 18 of file ImGuiLayer.h.

Constructor & Destructor Documentation

◆ ImGuiLayer() [1/2]

ImGuiLayer::ImGuiLayer ( )
default

◆ ~ImGuiLayer()

ImGuiLayer::~ImGuiLayer ( )
default

◆ ImGuiLayer() [2/2]

ImGuiLayer::ImGuiLayer ( const ImGuiLayer )
delete

Member Function Documentation

◆ beginFrame()

void ImGuiLayer::beginFrame ( )

Start a new ImGui frame (backend NewFrame + ImGui::NewFrame).

Definition at line 230 of file ImGuiLayer.cpp.

Here is the caller graph for this function:

◆ buildFontAtlas()

void ImGuiLayer::buildFontAtlas ( const std::vector< FontEntry > &  fonts,
int  selectedFont,
float  fontSize,
float  dpiScale 
)

Build (or rebuild) the font atlas from the currently selected font.

Definition at line 169 of file ImGuiLayer.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ discoverFonts()

void ImGuiLayer::discoverFonts ( std::vector< FontEntry > &  fonts,
int &  selectedFont 
)

Scan font directories for .ttf / .otf files and populate fonts. If selectedFont is <= 0 a sensible default is chosen.

Definition at line 100 of file ImGuiLayer.cpp.

Here is the caller graph for this function:

◆ endFrame()

void ImGuiLayer::endFrame ( const AppWindow window)

Finalise the ImGui frame: Render(), clear the default framebuffer, and draw the ImGui render data.

Definition at line 237 of file ImGuiLayer.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ init()

bool ImGuiLayer::init ( GLFWwindow *  window,
float  dpiScale,
UIState uiState 
)

Create the ImGui context, configure flags, apply DPI scaling, register the panel open/close settings handler, and initialise the GLFW + OpenGL3 backends.

Definition at line 61 of file ImGuiLayer.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ operator=()

ImGuiLayer & ImGuiLayer::operator= ( const ImGuiLayer )
delete

◆ rebuildFontAtlasIfDirty()

void ImGuiLayer::rebuildFontAtlasIfDirty ( bool &  fontsDirty,
const std::vector< FontEntry > &  fonts,
int  selectedFont,
float  fontSize,
float  dpiScale 
)

If the fontsDirty flag is set, rebuild the atlas and clear the flag.

Definition at line 195 of file ImGuiLayer.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ shutdown()

void ImGuiLayer::shutdown ( )

Shut down ImGui backends and destroy the context.

Definition at line 91 of file ImGuiLayer.cpp.

Here is the caller graph for this function:

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