From 7fe47a9d5b1727a61dc724523b530762f6d6ba19 Mon Sep 17 00:00:00 2001 From: rtk0c Date: Thu, 30 Jun 2022 21:38:53 -0700 Subject: Restructure project --- app/source/Cplt/Entrypoint/Backend_Metal.mm | 40 +++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 app/source/Cplt/Entrypoint/Backend_Metal.mm (limited to 'app/source/Cplt/Entrypoint/Backend_Metal.mm') diff --git a/app/source/Cplt/Entrypoint/Backend_Metal.mm b/app/source/Cplt/Entrypoint/Backend_Metal.mm new file mode 100644 index 0000000..276bef2 --- /dev/null +++ b/app/source/Cplt/Entrypoint/Backend_Metal.mm @@ -0,0 +1,40 @@ +#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::CreateMetalBackend() +{ + try { + return std::make_unique(); + } catch (std::exception& e) { + return nullptr; + } +} + +#else // ^^ BUILD_CORE_WITH_METAL_BACKEND | BUILD_CORE_WITH_METAL_BACKEND vv + +std::unique_ptr RenderingBackend::CreateMetalBackend() +{ + return nullptr; +} + +#endif -- cgit v1.2.3-70-g09d2