diff options
author | rtk0c <[email protected]> | 2021-04-10 21:13:34 -0700 |
---|---|---|
committer | rtk0c <[email protected]> | 2021-04-10 21:13:34 -0700 |
commit | 568fcc1dfe40c37b57b7baa2dea93b291d3fa956 (patch) | |
tree | 826b410c502a950c1d4804d351959da914003b36 /core/src/Entrypoint/Backend_Metal.mm | |
parent | 4303d0be47526b35e5bb3e3be001da227dae5d96 (diff) |
Add dx11, dx12, and vulkan backends
Diffstat (limited to 'core/src/Entrypoint/Backend_Metal.mm')
-rw-r--r-- | core/src/Entrypoint/Backend_Metal.mm | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/core/src/Entrypoint/Backend_Metal.mm b/core/src/Entrypoint/Backend_Metal.mm new file mode 100644 index 0000000..a1f4993 --- /dev/null +++ b/core/src/Entrypoint/Backend_Metal.mm @@ -0,0 +1,34 @@ +#include "Backend.hpp" + +#if BUILD_CORE_WITH_METAL_BACKEND + +class MetalBackend : public RenderingBackend { +public: + MetalBackend() { + // TODO + } + + virtual ~MetalBackend() { + // TODO + } + + virtual void RunUntilWindowClose(void (*windowContent)()) { + // TODO + } +}; + +std::unique_ptr<RenderingBackend> RenderingBackend::CreateMetalBackend() { + try { + return std::make_unique<MetalBackend>(); + } catch (std::exception& e) { + return nullptr; + } +} + +#else // ^^ BUILD_CORE_WITH_METAL_BACKEND | BUILD_CORE_WITH_METAL_BACKEND vv + +std::unique_ptr<RenderingBackend> RenderingBackend::CreateMetalBackend() { + return nullptr; +} + +#endif |