diff options
author | rtk0c <[email protected]> | 2021-03-28 13:24:52 -0700 |
---|---|---|
committer | rtk0c <[email protected]> | 2021-03-28 13:24:52 -0700 |
commit | bdcc81822adddf2c6ad7f10d9e090d913475c1e0 (patch) | |
tree | 91997b21958992f4e9e48839166ea4feaa0712b1 /core/src/Entrypoint/Common.hpp | |
parent | 442d2d75d71bbc057e667edc301a79fa1cc813be (diff) |
Initial code structure
Diffstat (limited to 'core/src/Entrypoint/Common.hpp')
-rw-r--r-- | core/src/Entrypoint/Common.hpp | 20 |
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); +}; |