28 #ifndef BERSERK_ENGINE_HPP
29 #define BERSERK_ENGINE_HPP
139 void ConfigureWindow();
140 void SetWindowManager(std::shared_ptr<WindowManager> windowManager);
141 void SetInput(std::shared_ptr<Input> input);
142 void SetRHIDevice(std::shared_ptr<RHIDevice> device);
143 void SetRHIThread(std::shared_ptr<Thread> thread);
144 void Update(
float t,
float dt);
149 std::unique_ptr<Output> mOutput;
150 std::unique_ptr<FileSystem> mFileSystem;
151 std::unique_ptr<Scheduler> mScheduler;
152 std::unique_ptr<EventDispatcher> mEventDispatcher;
154 std::shared_ptr<WindowManager> mWindowManager;
155 std::shared_ptr<Input> mInput;
156 std::shared_ptr<RHIDevice> mRHIDevice;
157 std::shared_ptr<Thread> mRHIThread;
159 std::unique_ptr<RenderEngine> mRenderEngine;
160 std::unique_ptr<ResourceManager> mResourceManager;
162 std::thread::id mGameThreadID;
163 std::atomic_bool mCloseRequested{
false};
#define BRK_NS_END
Definition: Config.hpp:48
#define BRK_API
Definition: Config.hpp:32
Game application main class.
Definition: Application.hpp:63
Key-values based config file in plist style.
Definition: Config.hpp:49
Root manager class.
Definition: Engine.hpp:72
static BRK_API Engine & Instance()
Return engine global instance.
Definition: Engine.cpp:115
BRK_API Output & GetOutput()
Definition: Engine.cpp:63
BRK_API Scheduler & GetScheduler()
Definition: Engine.cpp:71
BRK_API ~Engine()
Definition: Engine.cpp:34
BRK_API FileSystem & GetFileSystem()
Definition: Engine.cpp:67
BRK_API bool CloseRequested()
Check if close of the application is requested.
Definition: Engine.cpp:55
BRK_API float GetTime() const
Definition: Engine.cpp:111
BRK_API float GetDeltaTime() const
Definition: Engine.cpp:107
BRK_API const Config & GetConfig()
Definition: Engine.cpp:59
BRK_API Input & GetInput()
Definition: Engine.cpp:83
BRK_API RHIDevice & GetRHIDevice()
Definition: Engine.cpp:87
BRK_API ResourceManager & GetResourceManager()
Definition: Engine.cpp:99
BRK_API Thread & GetRHIThread()
Definition: Engine.cpp:91
BRK_API RenderEngine & GetRenderEngine()
Definition: Engine.cpp:95
BRK_API std::thread::id GetGameThreadId() const
Definition: Engine.cpp:103
BRK_API EventDispatcher & GetEventDispatcher()
Definition: Engine.cpp:75
BRK_API void RequestClose()
Request close of the application Call this function to request close and application shut-down.
Definition: Engine.cpp:51
BRK_API WindowManager & GetWindowManager()
Definition: Engine.cpp:79
Event dispatcher is responsible for managing engine events.
Definition: EventDispatcher.hpp:58
Target platform file system access and file utils.
Definition: FileSystem.hpp:53
Unified console output for utf-8 text.
Definition: Output.hpp:41
RHI device.
Definition: RHIDevice.hpp:67
Main rendering engine class.
Definition: RenderEngine.hpp:50
Main engine resource management class.
Definition: ResourceManager.hpp:59
Scheduler is responsible for triggering the scheduled callbacks.
Definition: Scheduler.hpp:59
Represents thread wrapper used to enqueue commands to execute.
Definition: Thread.hpp:54
Manager for OS windows.
Definition: WindowManager.hpp:47
Definition: GLDevice.cpp:46