From 568fcc1dfe40c37b57b7baa2dea93b291d3fa956 Mon Sep 17 00:00:00 2001 From: rtk0c Date: Sat, 10 Apr 2021 21:13:34 -0700 Subject: Add dx11, dx12, and vulkan backends --- core/src/Entrypoint/Backend.hpp | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 core/src/Entrypoint/Backend.hpp (limited to 'core/src/Entrypoint/Backend.hpp') 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 + +class RenderingBackend { +public: + // Implemented in Backend_OpenGL2.cpp + static std::unique_ptr CreateOpenGL2Backend(); + // Implemented in Backend_OpenGL3.cpp + static std::unique_ptr CreateOpenGL3Backend(); + // Implemented in Backend_Vulkan.cpp + static std::unique_ptr CreateVulkanBackend(); + // Implemented in Backend_DirectX11.cpp + static std::unique_ptr CreateDx11Backend(); + // Implemented in Backend_DirectX12.cpp + static std::unique_ptr CreateDx12Backend(); + // Implemented in Backend_Metal.cpp + static std::unique_ptr CreateMetalBackend(); + + virtual ~RenderingBackend() = default; + virtual void RunUntilWindowClose(void (*windowContent)()) = 0; +}; -- cgit v1.2.3-70-g09d2