Hymn to Beauty
C++ 3D Engine
Utility::Window Class Reference

#include <Window.hpp>

Public Member Functions

 Window (unsigned int width, unsigned int height, bool fullscreen=false, bool borderless=false, const char *title="", bool noAPI=false)
 Create new window. More...
 
 ~Window ()
 Destructor. More...
 
void SetSize (const glm::uvec2 &size)
 Set the size of the window. More...
 
const glm::uvec2 & GetSize () const
 Get the size of the window. More...
 
void Update ()
 Update. More...
 
bool ShouldClose () const
 Get whether the window should close. More...
 
void CancelClose ()
 Cancel the closing of the window. More...
 
void SetWindowMode (bool fullscreen, bool borderless) const
 Set window mode. More...
 
void GetWindowMode (bool &fullscreen, bool &borderless) const
 Get window mode. More...
 
GLFWwindow * GetGLFWWindow ()
 Get the GLFW window. More...
 

Constructor & Destructor Documentation

◆ Window()

Utility::Window::Window ( unsigned int  width,
unsigned int  height,
bool  fullscreen = false,
bool  borderless = false,
const char *  title = "",
bool  noAPI = false 
)

Create new window.

Parameters
widthWidth of the window in pixels.
heightHeight of the window in pixels.
fullscreenWhether to start in fullscreen mode.
borderlessWhether to use a borderless window.
titleWindow title.
noAPICreate window without any specific API.
Todo:
Print error to log.

◆ ~Window()

Utility::Window::~Window ( )

Destructor.

Member Function Documentation

◆ CancelClose()

void Utility::Window::CancelClose ( )

Cancel the closing of the window.

◆ GetGLFWWindow()

GLFWwindow * Utility::Window::GetGLFWWindow ( )

Get the GLFW window.

Returns
The GLFW window.

◆ GetSize()

const glm::uvec2 & Utility::Window::GetSize ( ) const

Get the size of the window.

Returns
The size of the window in pixels.

◆ GetWindowMode()

void Utility::Window::GetWindowMode ( bool &  fullscreen,
bool &  borderless 
) const

Get window mode.

Parameters
fullscreenGet whether window is fullscreen.
borderlessGet whether window is borderless.

◆ SetSize()

void Utility::Window::SetSize ( const glm::uvec2 &  size)

Set the size of the window.

Note that this function does not resize the window. It merely updates the stored size value.

Parameters
sizeThe new size of the window.

◆ SetWindowMode()

void Utility::Window::SetWindowMode ( bool  fullscreen,
bool  borderless 
) const

Set window mode.

Parameters
fullscreenWhether window should be fullscreen.
borderlessWhether window should be borderless.

◆ ShouldClose()

bool Utility::Window::ShouldClose ( ) const

Get whether the window should close.

Returns
Whether the window should close

◆ Update()

void Utility::Window::Update ( )

Update.


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