diff options
author | rtk0c <[email protected]> | 2022-06-30 21:38:53 -0700 |
---|---|---|
committer | rtk0c <[email protected]> | 2022-06-30 21:38:53 -0700 |
commit | 7fe47a9d5b1727a61dc724523b530762f6d6ba19 (patch) | |
tree | e95be6e66db504ed06d00b72c579565bab873277 /app/source/Cplt/Entrypoint/Backend_Metal.mm | |
parent | 2cf952088d375ac8b2f45b144462af0953436cff (diff) |
Restructure project
Diffstat (limited to 'app/source/Cplt/Entrypoint/Backend_Metal.mm')
-rw-r--r-- | app/source/Cplt/Entrypoint/Backend_Metal.mm | 40 |
1 files changed, 40 insertions, 0 deletions
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> 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 |