Acheron
Loading...
Searching...
No Matches
window.hpp
1#pragma once
2
3#include "acheron.hpp"
4
5namespace acheron::window {
9 struct WindowConfig {
10 int width = 1280;
11 int height = 720;
12 std::string title = "Acheron";
13 };
14
18 struct Window {
19 int width;
20 int height;
21 std::string title;
22
23 bool shouldClose = false;
24 void* nativeHandle = nullptr;
25 };
26
31 void Register(ecs::World& world) override;
32 };
33}
Central context for the ECS.
Definition world.hpp:20
The base struct a Module should inherit.
Definition module.hpp:9
The config for the window.
Definition window.hpp:9
int height
The windows height.
Definition window.hpp:11
int width
The windows width.
Definition window.hpp:10
std::string title
The windows title.
Definition window.hpp:12
Module to import to create the window.
Definition window.hpp:30
void Register(ecs::World &world) override
Called when a module is imported.
Definition window.cpp:48
Singleton that is updated every frame.
Definition window.hpp:18
int height
The windows width, updated when resized.
Definition window.hpp:20
void * nativeHandle
Handle to the native window.
Definition window.hpp:24
int width
The windows width, updated when resized.
Definition window.hpp:19
bool shouldClose
If the window should close, use for game loop.
Definition window.hpp:23
std::string title
The windows title, updated when changed.
Definition window.hpp:21