From bdcc81822adddf2c6ad7f10d9e090d913475c1e0 Mon Sep 17 00:00:00 2001 From: rtk0c Date: Sun, 28 Mar 2021 13:24:52 -0700 Subject: Initial code structure --- core/src/Entrypoint/Common.hpp | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 core/src/Entrypoint/Common.hpp (limited to 'core/src/Entrypoint/Common.hpp') 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 + +#include + +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); +}; -- cgit v1.2.3-70-g09d2