summary refs log tree commit diff
path: root/src/Game.hpp
diff options
context:
space:
mode:
authorMel <einebeere@gmail.com>2024-02-12 12:55:11 +0100
committerMel <einebeere@gmail.com>2024-02-12 12:55:11 +0100
commitd2b5fc5b3bc648afffa42375706429685ac63794 (patch)
treea2dfbb241e1d46e5616c5884e5f3d685de2a2cb6 /src/Game.hpp
parent588c7e87b7cab270698d43ca5c22d67793ae5fc4 (diff)
downloadmeowcraft-d2b5fc5b3bc648afffa42375706429685ac63794.tar.zst
meowcraft-d2b5fc5b3bc648afffa42375706429685ac63794.zip
Split rendering into own thread and sync through render action lists
Diffstat (limited to 'src/Game.hpp')
-rw-r--r--src/Game.hpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/Game.hpp b/src/Game.hpp
new file mode 100644
index 0000000..ccb0013
--- /dev/null
+++ b/src/Game.hpp
@@ -0,0 +1,20 @@
+#pragma once
+#include "Render.hpp"
+
+namespace MC {
+
+class Game {
+public:
+    explicit Game(GFX::Window& window, std::shared_ptr<Render::Control> control)
+        : m_window(window)
+        , m_render_control(std::move(control)) {}
+
+    void run() const;
+private:
+    void fix_macos_render() const;
+
+    GFX::Window& m_window;
+    std::shared_ptr<Render::Control> m_render_control;
+};
+
+}