summaryrefslogtreecommitdiff
path: root/core/src/Entrypoint/Backend.hpp
diff options
context:
space:
mode:
authorrtk0c <[email protected]>2021-04-10 21:13:34 -0700
committerrtk0c <[email protected]>2021-04-10 21:13:34 -0700
commit568fcc1dfe40c37b57b7baa2dea93b291d3fa956 (patch)
tree826b410c502a950c1d4804d351959da914003b36 /core/src/Entrypoint/Backend.hpp
parent4303d0be47526b35e5bb3e3be001da227dae5d96 (diff)
Add dx11, dx12, and vulkan backends
Diffstat (limited to 'core/src/Entrypoint/Backend.hpp')
-rw-r--r--core/src/Entrypoint/Backend.hpp22
1 files changed, 22 insertions, 0 deletions
diff --git a/core/src/Entrypoint/Backend.hpp b/core/src/Entrypoint/Backend.hpp
new file mode 100644
index 0000000..9ceccb1
--- /dev/null
+++ b/core/src/Entrypoint/Backend.hpp
@@ -0,0 +1,22 @@
+#pragma once
+
+#include <memory>
+
+class RenderingBackend {
+public:
+ // Implemented in Backend_OpenGL2.cpp
+ static std::unique_ptr<RenderingBackend> CreateOpenGL2Backend();
+ // Implemented in Backend_OpenGL3.cpp
+ static std::unique_ptr<RenderingBackend> CreateOpenGL3Backend();
+ // Implemented in Backend_Vulkan.cpp
+ static std::unique_ptr<RenderingBackend> CreateVulkanBackend();
+ // Implemented in Backend_DirectX11.cpp
+ static std::unique_ptr<RenderingBackend> CreateDx11Backend();
+ // Implemented in Backend_DirectX12.cpp
+ static std::unique_ptr<RenderingBackend> CreateDx12Backend();
+ // Implemented in Backend_Metal.cpp
+ static std::unique_ptr<RenderingBackend> CreateMetalBackend();
+
+ virtual ~RenderingBackend() = default;
+ virtual void RunUntilWindowClose(void (*windowContent)()) = 0;
+};