aboutsummaryrefslogtreecommitdiff
path: root/app/source/Cplt/Entrypoint/Backend_Metal.mm
diff options
context:
space:
mode:
authorrtk0c <[email protected]>2022-06-30 21:38:53 -0700
committerrtk0c <[email protected]>2022-06-30 21:38:53 -0700
commit7fe47a9d5b1727a61dc724523b530762f6d6ba19 (patch)
treee95be6e66db504ed06d00b72c579565bab873277 /app/source/Cplt/Entrypoint/Backend_Metal.mm
parent2cf952088d375ac8b2f45b144462af0953436cff (diff)
Restructure project
Diffstat (limited to 'app/source/Cplt/Entrypoint/Backend_Metal.mm')
-rw-r--r--app/source/Cplt/Entrypoint/Backend_Metal.mm40
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