Untitled 2D game engine pre-alpha
A 2D game engine made with Vulkan in C++
 
Loading...
Searching...
No Matches
window Namespace Reference

Handles window creation and Vulkan initialization and main loop. code can be found in window.cpp. More...

Functions

void Init ()
 alias for backgroundColour
 
void Close ()
 Closes the window and cleans up Vulkan.
 
void SetWindowResolution (u32 width, u32 height)
 Sets the window resolution.
 
void SetRenderResolution (u32 width, u32 height)
 Sets the render resolution.
 
u32Vec2 GetRenderResolution ()
 Gets the render resolution.
 
u32Vec2 GetWindowResolution ()
 Gets the window resolution.
 

Variables

const char * title = "..."
 Title of the window.
 
bool isResizable = false
 Going to be flags later on...
 
Colour backgroundColour
 Background colour, has alias backgroundColor.
 
auto & Initialise = Init
 Alias for Init()
 
auto & Initialize = Init
 Alias for Init()
 
auto & Exit = Close
 Alias for Close()
 
auto & Terminate = Close
 Alias for Close()
 

Detailed Description

Handles window creation and Vulkan initialization and main loop. code can be found in window.cpp.

Encapsulates all the logic and functionalty for creating a Window and Vulkan initalization.

Function Documentation

◆ Close()

void window::Close ( )

Closes the window and cleans up Vulkan.

Window has to be initialised

Deferred execution: called on program exit.

Definition at line 182 of file window.cpp.

◆ GetRenderResolution()

u32Vec2 window::GetRenderResolution ( )

Gets the render resolution.

Render resolution is not in namespace as setting the values directly would skip code that changes the actual render resolution

Definition at line 238 of file window.cpp.

◆ GetWindowResolution()

u32Vec2 window::GetWindowResolution ( )

Gets the window resolution.

Window resolution is not in namespace as setting the values directly would skip code that changes the actual window resolution

Definition at line 239 of file window.cpp.

◆ Init()

void window::Init ( )

alias for backgroundColour

Initialse GLFW and Vulkan

Window and render resolution has to be set beforehand

Definition at line 140 of file window.cpp.

◆ SetRenderResolution()

void window::SetRenderResolution ( u32 width,
u32 height )

Sets the render resolution.

Needs to be ran before Init() is called

Definition at line 230 of file window.cpp.

◆ SetWindowResolution()

void window::SetWindowResolution ( u32 width,
u32 height )

Sets the window resolution.

Needs to be ran before Init() is called

Definition at line 217 of file window.cpp.

Variable Documentation

◆ backgroundColour

Colour window::backgroundColour

Background colour, has alias backgroundColor.

Definition at line 138 of file window.cpp.

◆ Exit

auto& window::Exit = Close
inline

Alias for Close()

Definition at line 45 of file window.h.

◆ Initialise

auto& window::Initialise = Init
inline

Alias for Init()

Definition at line 34 of file window.h.

◆ Initialize

auto& window::Initialize = Init
inline

Alias for Init()

Definition at line 36 of file window.h.

◆ isResizable

bool window::isResizable = false

Going to be flags later on...

Definition at line 137 of file window.cpp.

◆ Terminate

auto& window::Terminate = Close
inline

Alias for Close()

Definition at line 47 of file window.h.

◆ title

const char * window::title = "..."

Title of the window.

Definition at line 136 of file window.cpp.