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

#include <AppWindow.h>

Public Member Functions

 AppWindow ()=default
 
 ~AppWindow ()
 
 AppWindow (const AppWindow &)=delete
 
AppWindowoperator= (const AppWindow &)=delete
 
bool init (int width, int height, const char *title)
 
void setIcon (const char *fallbackPath)
 Load and set the window icon from a PNG file.
 
float queryDpiScale () const
 Query the monitor content-scale (DPI).
 
void pollEvents ()
 Poll platform events (must be called once per frame).
 
void swapBuffers ()
 Swap the front/back framebuffers.
 
bool shouldClose () const
 Returns true when the user (or code) has requested the window to close.
 
void requestClose ()
 Signal the window to close.
 
void framebufferSize (int &w, int &h) const
 Retrieve the framebuffer size in pixels.
 
GLFWwindow * handle () const noexcept
 Raw GLFW handle — needed by ImGui backends and CustomTitleBar.
 

Static Private Member Functions

static void errorCallback (int error, const char *description)
 

Private Attributes

GLFWwindow * m_window = nullptr
 

Detailed Description

Definition at line 12 of file AppWindow.h.

Constructor & Destructor Documentation

◆ AppWindow() [1/2]

AppWindow::AppWindow ( )
default

◆ ~AppWindow()

AppWindow::~AppWindow ( )

Definition at line 24 of file AppWindow.cpp.

◆ AppWindow() [2/2]

AppWindow::AppWindow ( const AppWindow )
delete

Member Function Documentation

◆ errorCallback()

void AppWindow::errorCallback ( int  error,
const char *  description 
)
staticprivate

Definition at line 17 of file AppWindow.cpp.

Here is the caller graph for this function:

◆ framebufferSize()

void AppWindow::framebufferSize ( int &  w,
int &  h 
) const

Retrieve the framebuffer size in pixels.

Definition at line 128 of file AppWindow.cpp.

Here is the caller graph for this function:

◆ handle()

GLFWwindow * AppWindow::handle ( ) const
inlinenoexcept

Raw GLFW handle — needed by ImGui backends and CustomTitleBar.

Definition at line 47 of file AppWindow.h.

Here is the caller graph for this function:

◆ init()

bool AppWindow::init ( int  width,
int  height,
const char *  title 
)

Create the GLFW window and load OpenGL via glad.

Returns
true on success, false on fatal error.

Definition at line 34 of file AppWindow.cpp.

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

◆ operator=()

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

◆ pollEvents()

void AppWindow::pollEvents ( )

Poll platform events (must be called once per frame).

Definition at line 107 of file AppWindow.cpp.

Here is the caller graph for this function:

◆ queryDpiScale()

float AppWindow::queryDpiScale ( ) const

Query the monitor content-scale (DPI).

Definition at line 97 of file AppWindow.cpp.

Here is the caller graph for this function:

◆ requestClose()

void AppWindow::requestClose ( )

Signal the window to close.

Definition at line 122 of file AppWindow.cpp.

Here is the caller graph for this function:

◆ setIcon()

void AppWindow::setIcon ( const char *  fallbackPath)

Load and set the window icon from a PNG file.

Definition at line 70 of file AppWindow.cpp.

Here is the caller graph for this function:

◆ shouldClose()

bool AppWindow::shouldClose ( ) const

Returns true when the user (or code) has requested the window to close.

Definition at line 117 of file AppWindow.cpp.

Here is the caller graph for this function:

◆ swapBuffers()

void AppWindow::swapBuffers ( )

Swap the front/back framebuffers.

Definition at line 112 of file AppWindow.cpp.

Here is the caller graph for this function:

Member Data Documentation

◆ m_window

GLFWwindow* AppWindow::m_window = nullptr
private

Definition at line 50 of file AppWindow.h.


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