OpenShaderDesigner 0.0.1
Loading...
Searching...
No Matches
Engine.h
1// =====================================================================================================================
2// OpenShaderDesigner, an open source software utility to create materials and shaders.
3// Copyright (C) 2024 Medusa Slockbower
4//
5// This program is free software: you can redistribute it and/or modify
6// it under the terms of the GNU General Public License as published by
7// the Free Software Foundation, either version 3 of the License, or
8// (at your option) any later version.
9//
10// This program is distributed in the hope that it will be useful,
11// but WITHOUT ANY WARRANTY; without even the implied warranty of
12// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13// GNU General Public License for more details.
14//
15// You should have received a copy of the GNU General Public License
16// along with this program. If not, see <https://www.gnu.org/licenses/>.
17// =====================================================================================================================
18
19
20#ifndef ENGINE_H
21#define ENGINE_H
22
23#include <Core/Window.h>
24#include <Utility/Timer.h>
25
26namespace OpenShaderDesigner
27{
28
29class Engine
30{
31public:
32 static void Start(const Window::Configuration& config);
33 static void Stop();
34
35 static inline const char* VersionString() { return PROJECT_VERSION; }
36 static inline int VersionMajor() { return PROJECT_VERSION_MAJOR; }
37 static inline int VersionMinor() { return PROJECT_VERSION_MINOR; }
38 static inline int VersionPatch() { return PROJECT_VERSION_PATCH; }
39
40 static Window& GetMainWindow() { return *MainWindow; }
41
42private:
43 static void Initialize();
44 static void Shutdown();
45 static void Update();
46
47 inline static Timer Time;
48 inline static Timer Frame;
49 inline static double _Delta;
50 inline static double _Runtime;
51 inline static Window* MainWindow;
52
53public:
54 inline static const double& Delta = _Delta;
55 inline static const double& Runtime = _Runtime;
56};
57
58}
59
60
61
62#endif //ENGINE_H
Definition Engine.h:30
Definition Timer.h:28
Definition Window.h:54