#include <Window.hpp>
Definition at line 77 of file Window.hpp.
◆ Window()
Initializes the lower level Windowing API
◆ ~Window()
Kale::Window::~Window |
( |
| ) |
|
Frees resources of the window
◆ create()
void Kale::Window::create |
( |
const char * | title | ) |
|
|
protected |
Creates a new window. Some Operating systems (IOS/Android/TvOS) only support the creation of a single window
- Parameters
-
title | The title of the window |
◆ createWindowSurface()
void Kale::Window::createWindowSurface |
( |
const vk::UniqueInstance & | instance, |
|
|
vk::UniqueSurfaceKHR & | surface ) const |
|
protected |
Creates a vulkan window surface given the instance and the surface references
- Parameters
-
instance | The instance reference |
surface | The surface reference |
- Exceptions
-
If | the surface creation failed |
◆ getFramebufferSize()
Vector2ui Kale::Window::getFramebufferSize |
( |
| ) |
const |
Gets the frame buffer size for canvas creation
◆ getInstanceExtensions()
std::vector< const char * > Kale::Window::getInstanceExtensions |
( |
| ) |
const |
|
protected |
Gets the extensions required for VKCreateInfo depending on the windowing API
- Returns
- The required extensions for the lower level windowing API
◆ getSize()
Gets the window size
- Returns
- The window size
◆ getSizeF()
Vector2f Kale::Window::getSizeF |
( |
| ) |
const |
Gets the window size
- Returns
- The window size as a float vector
◆ getTitle()
const char * Kale::Window::getTitle |
( |
| ) |
const |
Gets the window title
- Returns
- The window title
◆ isOpen()
bool Kale::Window::isOpen |
( |
| ) |
const |
Thread safe method to check whether or not the window is currently open
- Returns
- Whether or not the window is open
◆ lockCursor()
void Kale::Window::lockCursor |
( |
| ) |
|
Locks the cursor to allow for better gameplay
◆ registerEvents()
Starts listening to events, override the functions provided in EventHandler to handle the events
- Parameters
-
handler | The handler to begin receiving events with |
Starts listening to events, override the functions provided in EventHandler to handle the events
Definition at line 24 of file Window.cpp.
◆ removeEvents()
Stops listening to events
- Parameters
-
handler | The handler to remove from receiving events |
Stops listening to events
Definition at line 31 of file Window.cpp.
◆ setIcon()
void Kale::Window::setIcon |
( |
const std::string & | filePath | ) |
|
Sets the window icon to the given image
- Parameters
-
filePath | The window icon to set to |
◆ setupGlad()
void Kale::Window::setupGlad |
( |
| ) |
const |
|
protected |
◆ swapBuffers()
void Kale::Window::swapBuffers |
( |
| ) |
const |
|
protectednoexcept |
Uses the windowing API to swap the front and back buffers
◆ unlockCursor()
void Kale::Window::unlockCursor |
( |
| ) |
|
Unlocks the cursor for menus/etc
◆ update()
void Kale::Window::update |
( |
| ) |
|
|
protected |
◆ Application
◆ OpenGL::Core
◆ Vulkan::Core
◆ eventHandlers
A linked list of all event listeners for this window
Definition at line 90 of file Window.hpp.
The documentation for this class was generated from the following files: