feat: 搭建 Vulkan 1.4 渲染器骨架,绘制旋转 3D 立方体

使用 Vulkan 1.4 现代路径初始化引擎骨架:
- 用 Shader Object (VK_EXT_shader_object) 替代传统 VkPipeline
- 用 Dynamic Rendering 替代 RenderPass/Framebuffer
- 用 Synchronization2 管理 barrier

核心模块:
- Window:GLFW 封装,GLFW_NO_API 模式,兼容 Wayland
- Log:spdlog 封装
- Types:u32/u64/f32 类型别名

Vulkan 后端:
- Device:Instance、PhysicalDevice、LogicalDevice、Queue 及 feature 查询
- Swapchain:Image、ImageView、DepthBuffer、Recreate
- ShaderManager:SPIR-V 加载与 ShaderEXT 创建
- CommandManager:CommandPool 与主 CommandBuffer
- SyncManager:per-frame Fence 与 ImageAvailable semaphore,per-image RenderFinished semaphore,2 frames in flight
- MemoryAllocator:内存子分配器,256MB block,persistent mapping
- Buffer:VertexBuffer、IndexBuffer、UniformBuffer 封装
- UniformBuffer:每帧上传 MVP 矩阵
- DescriptorManager:DescriptorSetLayout、DescriptorPool、DescriptorSet 及更新

Renderer:
- 协调所有子系统
- 绘制每面不同颜色的旋转 3D 立方体
- 启用 depth test,MVP 矩阵由 GLM 计算

构建:
- CMake 组织 Engine 静态库与 App 可执行文件
- glfw、glm、spdlog 通过 add_subdirectory 引入
This commit is contained in:
2026-09-20 23:09:40 +08:00
parent 706ee2301e
commit 381b7c0aa6
38 changed files with 2423 additions and 12 deletions
+9
View File
@@ -0,0 +1,9 @@
[submodule "Lib/glfw"]
path = Lib/glfw
url = https://github.com/glfw/glfw.git
[submodule "Lib/glm"]
path = Lib/glm
url = https://github.com/g-truc/glm.git
[submodule "Lib/spdlog"]
path = Lib/spdlog
url = https://github.com/gabime/spdlog.git