aboutsummaryrefslogtreecommitdiff
path: root/core/src/Entrypoint/Common.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/src/Entrypoint/Common.hpp')
-rw-r--r--core/src/Entrypoint/Common.hpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/core/src/Entrypoint/Common.hpp b/core/src/Entrypoint/Common.hpp
new file mode 100644
index 0000000..2a4dcbf
--- /dev/null
+++ b/core/src/Entrypoint/Common.hpp
@@ -0,0 +1,20 @@
+#pragma once
+
+#include <glad/glad.h>
+
+#include <GLFW/glfw3.h>
+
+class RenderingBackend {
+protected:
+ GLFWwindow* mWindow;
+
+public:
+ virtual ~RenderingBackend() = default;
+ virtual void BeginFrame() = 0;
+ virtual void EndFrame() = 0;
+
+ GLFWwindow* GetWindow() const;
+
+ /// Common GLFW error handle callback for each rendering backend to use.
+ static void GlfwErrorCallback(int error, const char* message);
+};