Fling Engine  0.00.1
Fling Engine is a game engine written in Vulkan
Public Member Functions | Static Private Member Functions | Private Attributes
Fling::DesktopWindow Class Reference

Base class that represents a window to the Fling Engine using GLFW. More...

#include <DesktopWindow.h>

Inherits Fling::FlingWindow.

Public Member Functions

 DesktopWindow (const WindowProps &t_Props)
 
virtual ~DesktopWindow ()
 
virtual void CreateSurface (void *t_GraphicsInstance, void *t_SurfData) override
 Create the rendering surface for this window. More...
 
virtual void Update () override
 Tick the window (poll input from GLFW) More...
 
virtual void RecreateSwapChain () override
 Recreate the swap chain based on current window size with GLFW. More...
 
virtual int ShouldClose () override
 Check if this window should close. More...
 
virtual bool IsMinimized () const override
 Is this window currently minimized? More...
 
virtual UINT32 GetWidth () const override
 The current width of this window. More...
 
virtual UINT32 GetHeight () const override
 The current height of this window. More...
 
virtual float GetAspectRatio () const override
 The current aspect ratio of this windows. More...
 
GLFWwindow * GetGlfwWindow () const
 get the current GLFW window More...
 
- Public Member Functions inherited from Fling::FlingWindow
virtual ~FlingWindow ()=default
 
- Public Member Functions inherited from Fling::NonCopyable
 NonCopyable (const NonCopyable &)=delete
 
 NonCopyable (NonCopyable &&)=default
 
NonCopyableoperator= (const NonCopyable &)=delete
 
NonCopyableoperator= (NonCopyable &&)=default
 

Static Private Member Functions

static void FrameBufferResizeCallback (GLFWwindow *t_Window, int t_Width, int t_Height)
 

Private Attributes

GLFWwindow * m_Window = nullptr
 

Additional Inherited Members

- Static Public Member Functions inherited from Fling::FlingWindow
static FlingWindowCreate (const WindowProps &t_Props)
 Create a window with the given data. More...
 
- Protected Member Functions inherited from Fling::NonCopyable
 NonCopyable ()=default
 
virtual ~NonCopyable ()=default
 

Detailed Description

Base class that represents a window to the Fling Engine using GLFW.

Constructor & Destructor Documentation

◆ DesktopWindow()

Fling::DesktopWindow::DesktopWindow ( const WindowProps t_Props)

◆ ~DesktopWindow()

Fling::DesktopWindow::~DesktopWindow ( )
virtual

Member Function Documentation

◆ CreateSurface()

void Fling::DesktopWindow::CreateSurface ( void *  t_GraphicsInstance,
void *  t_SurfData 
)
overridevirtual

Create the rendering surface for this window.

Implements Fling::FlingWindow.

◆ FrameBufferResizeCallback()

void Fling::DesktopWindow::FrameBufferResizeCallback ( GLFWwindow *  t_Window,
int  t_Width,
int  t_Height 
)
staticprivate

◆ GetAspectRatio()

float Fling::DesktopWindow::GetAspectRatio ( ) const
overridevirtual

The current aspect ratio of this windows.

Implements Fling::FlingWindow.

◆ GetGlfwWindow()

GLFWwindow* Fling::DesktopWindow::GetGlfwWindow ( ) const
inline

get the current GLFW window

◆ GetHeight()

UINT32 Fling::DesktopWindow::GetHeight ( ) const
overridevirtual

The current height of this window.

Implements Fling::FlingWindow.

◆ GetWidth()

UINT32 Fling::DesktopWindow::GetWidth ( ) const
overridevirtual

The current width of this window.

Implements Fling::FlingWindow.

◆ IsMinimized()

bool Fling::DesktopWindow::IsMinimized ( ) const
overridevirtual

Is this window currently minimized?

Implements Fling::FlingWindow.

◆ RecreateSwapChain()

void Fling::DesktopWindow::RecreateSwapChain ( )
overridevirtual

Recreate the swap chain based on current window size with GLFW.

Implements Fling::FlingWindow.

◆ ShouldClose()

int Fling::DesktopWindow::ShouldClose ( )
overridevirtual

Check if this window should close.

Returns
0 if the window should not close, non-zero if it should.

Implements Fling::FlingWindow.

◆ Update()

void Fling::DesktopWindow::Update ( )
overridevirtual

Tick the window (poll input from GLFW)

Implements Fling::FlingWindow.

Field Documentation

◆ m_Window

GLFWwindow* Fling::DesktopWindow::m_Window = nullptr
private

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