Finality Engine
Loading...
Searching...
No Matches
Application.h
Go to the documentation of this file.
1
11#pragma once
12#include "Core.h"
13#include "RenderTypes.h"
14#include "Window.h"
15#include "RenderDevice.h"
16
17#include <memory>
18#include "Game.h"
19
20namespace FINALITY
21{
22 class ImGUIRenderer;
23
34 {
35 public:
38
39 void Initialize(const RendererAPI& api, const WindowSpec& spec, std::unique_ptr<Game> game);
40 void Update();
41 void Shutdown();
42
43 void RequestClose() { m_Running = false; }
44
45 static RendererAPI GetActiveAPI() { return s_CurrentAPI; }
46 static Application& Get() { return *s_Instance; }
47
48 RenderDevice& GetDevice() { return *m_RenderDevice; }
49 Window& GetWindow() { return *m_Window; }
51
52 private:
53 static RendererAPI s_CurrentAPI;
54
55 std::unique_ptr<Window> m_Window;
56 std::unique_ptr<RenderDevice> m_RenderDevice;
57 std::unique_ptr<Game> m_CurrentGame;
58
59 std::unique_ptr<ImGUIRenderer> m_ImGUIRenderer;
60
61 bool m_Running = false;
62 static inline Application* s_Instance = nullptr;
63 };
64}
#define FAPI
Definition Core.h:22
Defines the graphics backend boundary and render submission contract.
void Initialize(const RendererAPI &api, const WindowSpec &spec, std::unique_ptr< Game > game)
RenderDevice & GetDevice()
Definition Application.h:48
static RendererAPI GetActiveAPI()
Definition Application.h:45
static Application & Get()
Definition Application.h:46
ImGUIRenderer * GetImGUIRenderer()
Defines the graphics backend boundary and render submission contract.