Engine
Frameworkcreatedbymeusableforthecreationofsimplegames.CurrentlysupportsOpenGL(Verysimple)andVulkan.
Public Member Functions | Static Public Member Functions | Protected Attributes | Friends | List of all members
Engine::Window Class Reference

This object stores any information regarding the created GLFW window. More...

#include <Window.hpp>

Public Member Functions

bool ShouldClose () const noexcept
 This method returns if this window should close. More...
 
void SetShouldClose (bool value) const noexcept
 This method allows you to close the window. More...
 
HWND GetWindowHandle () const noexcept
 The hardware handle to this window. More...
 
eastl::weak_ptr< GLFWwindow > GetGLFWWindow () const noexcept
 Allows you to get the glfw pointer. More...
 
eastl::string GetTitle () const
 This method allows you to get the title of this window. More...
 
int GetWidth () const noexcept
 This method allows you to get the width of this window. More...
 
int GetDisplayWidth () const noexcept
 This method allows you to get the display width of this window. More...
 
int GetHeight () const noexcept
 This method allows you to get the height of this window. More...
 
int GetDisplayHeight () const noexcept
 This method allows you to get the display height of this window. More...
 
virtual ~Window () noexcept
 

Static Public Member Functions

static void OnWindowResized (GLFWwindow *window, int width, int height)
 This method is called whenever the GLFW window is resized. More...
 

Protected Attributes

int width
 
int displayWidth
 
int height
 
int displayHeight
 
eastl::shared_ptr< GLFWwindow > window
 
eastl::string title
 

Friends

class Engine
 
class Renderer
 

Detailed Description

This object stores any information regarding the created GLFW window.

Definition at line 28 of file Window.hpp.

Constructor & Destructor Documentation

Engine::Window::~Window ( )
virtualnoexcept

Definition at line 129 of file Window.cpp.

Member Function Documentation

int Engine::Window::GetDisplayHeight ( ) const
noexcept

This method allows you to get the display height of this window.

Returns
Returns the display height of this window as an int.

Definition at line 96 of file Window.cpp.

int Engine::Window::GetDisplayWidth ( ) const
noexcept

This method allows you to get the display width of this window.

Returns
Returns the display width of this window as an int.

Definition at line 86 of file Window.cpp.

eastl::weak_ptr< GLFWwindow > Engine::Window::GetGLFWWindow ( ) const
noexcept

Allows you to get the glfw pointer.

Returns
Returns the glfw pointer as a weak pointer.

Definition at line 71 of file Window.cpp.

int Engine::Window::GetHeight ( ) const
noexcept

This method allows you to get the height of this window.

Returns
Returns the height of this window as an int.

Definition at line 91 of file Window.cpp.

eastl::string Engine::Window::GetTitle ( ) const

This method allows you to get the title of this window.

Returns
Returns the title of this window as a std::string

Definition at line 76 of file Window.cpp.

int Engine::Window::GetWidth ( ) const
noexcept

This method allows you to get the width of this window.

Returns
Returns the width of this window as an int.

Definition at line 81 of file Window.cpp.

HWND Engine::Window::GetWindowHandle ( ) const
noexcept

The hardware handle to this window.

Returns
Returns the hardware handle to this window as a HWND.

Definition at line 66 of file Window.cpp.

void Engine::Window::OnWindowResized ( GLFWwindow *  window,
int  width,
int  height 
)
static

This method is called whenever the GLFW window is resized.

Parameters
windowThis is a reference to the window pointer.
widthThe new width.
heightThe new height.

Definition at line 29 of file Window.cpp.

void Engine::Window::SetShouldClose ( bool  value) const
noexcept

This method allows you to close the window.

Parameters
valueUse true to close this window, false to do nothing.
Returns

Definition at line 60 of file Window.cpp.

bool Engine::Window::ShouldClose ( ) const
noexcept

This method returns if this window should close.

Returns
Returns true if this window should close, will return false otherwise.

Definition at line 53 of file Window.cpp.

Friends And Related Function Documentation

friend class Engine
friend

Definition at line 102 of file Window.hpp.

friend class Renderer
friend

Definition at line 127 of file Window.hpp.

Member Data Documentation

int Engine::Window::displayHeight
protected

Definition at line 97 of file Window.hpp.

int Engine::Window::displayWidth
protected

Definition at line 96 of file Window.hpp.

int Engine::Window::height
protected

Definition at line 97 of file Window.hpp.

eastl::string Engine::Window::title
protected

Definition at line 99 of file Window.hpp.

int Engine::Window::width
protected

Definition at line 96 of file Window.hpp.

eastl::shared_ptr<GLFWwindow> Engine::Window::window
protected

Definition at line 98 of file Window.hpp.


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