1. 抽离了LApp的部分内容,以解耦其对Qt的依赖,并且尝试了拓展多渲染后端支持。

This commit is contained in:
2026-06-23 21:06:35 +08:00
parent 77d65014ab
commit d41c009a19
18 changed files with 691 additions and 172 deletions
+22 -1
View File
@@ -22,4 +22,25 @@
#define LAPP_GL_CLEAR_DEPTH(d) glClearDepthf(d)
#else
#define LAPP_GL_CLEAR_DEPTH(d) glClearDepth(d)
#endif
#endif
#define CONCAT_IMPL(a, b) a##b
#define CONCAT(a, b) CONCAT_IMPL(a, b)
// 渲染后端编译期类型选择 与 Cubism SDK 的 CubismRenderer::Create() 条件编译对齐
#if defined(RENDER_BACKEND_VULKAN)
#define RENDERER_BACKEND_TAG Vulkan
#elif defined(RENDER_BACKEND_D3D11)
#define RENDERER_BACKEND_TAG D3D11
#elif defined(RENDER_BACKEND_D3D9)
#define RENDERER_BACKEND_TAG D3D9
#elif defined(RENDER_BACKEND_METAL)
#define RENDERER_BACKEND_TAG Metal
#else
#define RENDERER_BACKEND_TAG OpenGLES2
#endif
// 类型别名宏,用于 Csm 命名空间下的后端特定类型
#define CUBISM_RENDERER_TYPE CONCAT(Csm::Rendering::CubismRenderer_, RENDERER_BACKEND_TAG)
#define CUBISM_OFFSCREEN_TYPE CONCAT(Csm::Rendering::CubismOffscreenSurface_, RENDERER_BACKEND_TAG)