Engine²
Open-source game engine written in C++.
Loading...
Searching...
No Matches
WindowSystem.hpp
Go to the documentation of this file.
1/**************************************************************************
2 * Window v0.0.0
3 *
4 * Window is a software plugin, part of the Engine².
5 *
6 * This file is part of the Engine² project that is under GPL-3.0 License.
7 * Copyright © 2024 by @EngineSquared, All rights reserved.
8 *
9 * Engine² is a free software: you can redistribute it and/or modify
10 * it under the terms of the GPL-3.0 License as published by the
11 * Free Software Foundation. See the GPL-3.0 License for more details.
12 *
13 * @file WindowSystem.hpp
14 * @brief Window systems declaration.
15 *
16 * This file contains the declaration of the window systems.
17 * The window systems are used to create and manage the windows.
18 * All window systems are automatically managed by the Engine² Core.
19 *
20 * @author @MasterLaplace
21 * @version 0.0.0
22 * @date 2025-03-11
23 **************************************************************************/
24
25#pragma once
26
27#include "Engine.hpp"
28#include "resource/Window.hpp"
29
30#include <iostream>
31
32namespace Window::System {
33
34const int DEFAULT_WIDTH = 800;
35const int DEFAULT_HEIGHT = 800;
36
45
53void EnableVSync(Engine::Core &core);
54
62void PollEvents(Engine::Core &core);
63
71void InitGLFW(const Engine::Core &core);
72
80void SetupGLFWHints(const Engine::Core &core);
81
90
98void SwapBuffers(Engine::Core &core);
99
107void StopSystems(Engine::Core &core);
108
118
126void DestroyWindow(Engine::Core &core);
127
136
137} // namespace Window::System
The core is the place where all the data of the engine is stored. It contains the registry (entities)...
Definition Core.hpp:33
Definition WindowSystem.cpp:6
void CreateWindowSystem(Engine::Core &core)
Create a GLFW window.
Definition WindowSystem.cpp:8
void DestroyWindow(Engine::Core &core)
Destroy the GLFW window.
Definition WindowSystem.cpp:49
void SetupWindowCallbacks(Engine::Core &core)
Setup window callbacks.
Definition WindowSystem.cpp:55
void SwapBuffers(Engine::Core &core)
Swap the buffers.
Definition WindowSystem.cpp:34
void SetupGLFWHints(const Engine::Core &)
Setup GLFW Hints.
Definition WindowSystem.cpp:27
void LinkGLFWContextToGL(Engine::Core &core)
Link the GLFW context to GL.
Definition WindowSystem.cpp:29
void EnableVSync(Engine::Core &)
Enable VSync.
Definition WindowSystem.cpp:14
const int DEFAULT_HEIGHT
Definition WindowSystem.hpp:35
void StoreCoreInWindow(Engine::Core &core)
Store a pointer to the currently used Core in the GLFW window.
Definition WindowSystem.cpp:44
void PollEvents(Engine::Core &)
Poll GLFW events.
Definition WindowSystem.cpp:16
const int DEFAULT_WIDTH
Definition WindowSystem.hpp:34
void StopSystems(Engine::Core &core)
Stop the window systems.
Definition WindowSystem.cpp:36
void InitGLFW(const Engine::Core &)
Initialize the GLFW.
Definition WindowSystem.cpp:18