diff options
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 |