-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathIGame.h
More file actions
40 lines (27 loc) · 829 Bytes
/
Copy pathIGame.h
File metadata and controls
40 lines (27 loc) · 829 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
//
// Created by SyperOlao on 18.03.2026.
//
#ifndef PINGPONG_IGAME_H
#define PINGPONG_IGAME_H
#include <cstdint>
#include "../Graphics/Color.h"
struct AppContext;
enum class RenderMode : std::uint8_t;
class IGame {
public:
virtual ~IGame() = default;
virtual void Initialize(AppContext &context) = 0;
virtual void Update(AppContext &context, float deltaTime) = 0;
virtual void Render(AppContext &context) = 0;
virtual void OnRenderModeChanged(AppContext &, RenderMode) {
}
virtual void Shutdown(AppContext &context) {
}
[[nodiscard]] virtual bool TryGetPreferredClearColor(Color &clearColor) const noexcept {
return false;
}
[[nodiscard]] virtual bool WantsGlobalRenderModeToggleOverlay() const noexcept {
return false;
}
};
#endif //PINGPONG_IGAME_H