[Feat] (All): Continue building the basic structure.

This commit is contained in:
BZLZHH
2025-07-12 20:29:20 +08:00
parent 9542512209
commit 9194e1c97f
15 changed files with 4689 additions and 4 deletions
+28
View File
@@ -0,0 +1,28 @@
#include "../Includes.h"
namespace MobileGL {
namespace MG_Config {
RendererInfo* RendererInfoPtr = nullptr;
}
namespace MG_Backend {
void Init() {
MGLOG_D("Initializing MobileGL Backend...");
#if MOBILEGL_BACKEND == MOBILEGL_BACKEND_DILIGENT
switch (MG_Config::Backend::Diligent::SpecificBackend) {
case MG_Backend::Diligent::SpecificBackendType::Vulkan:
MG_Config::RendererInfoPtr = (RendererInfo*)&MG_Backend::Diligent::RendererInfoVulkan;
break;
case MG_Backend::Diligent::SpecificBackendType::Metal:
MG_Config::RendererInfoPtr = (RendererInfo*)&MG_Backend::Diligent::RendererInfoMetal;
break;
default:
throw RuntimeError("Unsupported renderer type");
}
#else
MG_Config::RendererInfoPtr = (RendererInfo*)&RendererInfoUnknown;
#endif
}
}
}