luna engine
software engine
Loading...
Searching...
No Matches
luna::vulkan::windowsWindow Class Reference

#include <windowsWindow.h>

Inheritance diagram for luna::vulkan::windowsWindow:
Collaboration diagram for luna::vulkan::windowsWindow:

Classes

struct  windowData
 

Public Member Functions

 windowsWindow (const vulkan::windowSpec &windowData)
 creates a windows window. More...
 
virtual ~windowsWindow ()
 
void onUpdate () override
 polls all the window and input events. More...
 
uint32_t getWidth () const override
 returs the current width of the window. More...
 
uint32_t getHeight () const override
 return the current height of the window. More...
 
void setEventCallBack (const eventCallbackFn &callback) override
 set the window event callback function. More...
 
void * getWindow () override
 returns the GLFW window pointer. More...
 
virtual glm::vec2 getCursorPos () const override
 returns the current cursor pos. More...
 
- Public Member Functions inherited from luna::vulkan::window
virtual ~window ()
 
virtual void onUpdate ()=0
 
virtual uint32_t getWidth () const =0
 
virtual uint32_t getHeight () const =0
 
virtual void setEventCallBack (const eventCallbackFn &callback)=0
 
virtual void * getWindow ()=0
 
virtual glm::vec2 getCursorPos () const =0
 

Private Member Functions

virtual void init (const vulkan::windowSpec &windowInfo)
 
virtual void shutDown ()
 shutsdown the window and GLFW. More...
 

Private Attributes

GLFWwindow * _window
 
windowData mData
 

Additional Inherited Members

- Public Types inherited from luna::vulkan::window
using eventCallbackFn = std::function< void(Event &)>
 
- Static Public Member Functions inherited from luna::vulkan::window
static windowwindowCreate (const windowSpec &WindowSpec=windowSpec::windowSpec())
 
- Public Attributes inherited from luna::vulkan::window
windowSpec windowSpec
 
- Static Public Attributes inherited from luna::vulkan::window
static Api graphicsApi = Api::VULKAN
 

Constructor & Destructor Documentation

◆ windowsWindow()

luna::vulkan::windowsWindow::windowsWindow ( const vulkan::windowSpec windowData)

creates a windows window.

Parameters
windowDatawindowSpec struct with the window data

◆ ~windowsWindow()

luna::vulkan::windowsWindow::~windowsWindow ( )
virtual

Member Function Documentation

◆ getCursorPos()

glm::vec2 luna::vulkan::windowsWindow::getCursorPos ( ) const
overridevirtual

returns the current cursor pos.

Returns
glm::vec2

Implements luna::vulkan::window.

◆ getHeight()

uint32_t luna::vulkan::windowsWindow::getHeight ( ) const
inlineoverridevirtual

return the current height of the window.

Implements luna::vulkan::window.

◆ getWidth()

uint32_t luna::vulkan::windowsWindow::getWidth ( ) const
inlineoverridevirtual

returs the current width of the window.

Implements luna::vulkan::window.

◆ getWindow()

void * luna::vulkan::windowsWindow::getWindow ( )
inlineoverridevirtual

returns the GLFW window pointer.

Returns

Implements luna::vulkan::window.

◆ init()

void luna::vulkan::windowsWindow::init ( const vulkan::windowSpec windowInfo)
privatevirtual

initializes the window and also GLFW if need be.

Parameters
windowInfo

◆ onUpdate()

void luna::vulkan::windowsWindow::onUpdate ( )
overridevirtual

polls all the window and input events.

Implements luna::vulkan::window.

◆ setEventCallBack()

void luna::vulkan::windowsWindow::setEventCallBack ( const eventCallbackFn callback)
inlineoverridevirtual

set the window event callback function.

Implements luna::vulkan::window.

◆ shutDown()

void luna::vulkan::windowsWindow::shutDown ( )
privatevirtual

shutsdown the window and GLFW.

Member Data Documentation

◆ _window

GLFWwindow* luna::vulkan::windowsWindow::_window
private

◆ mData

windowData luna::vulkan::windowsWindow::mData
private

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