feat: add Graphics module with D3D12 backend and documentation

Graphics Module:
- Add platform abstraction layer (GraphicsPlatformInterface)
- Add unified renderer entry point (Renderer)
- Add D3D12 backend implementation (D3D12Core, D3D12Interface)
- Add TestRenderer for multi-window rendering tests

Documentation:
- Add Graphics渲染架构分析.md
- Add D3D12学习Wiki.md
- Add changelogs directory with per-commit documentation
- Add 20260326-dx12-initial.md for initial framework
- Add 20260326-d3d12-foundation.md for Graphics module

Fixes:
- Resolve header include issues and type redefinition errors
This commit is contained in:
SpecialX
2026-03-26 16:53:09 +08:00
parent 6ca6970e34
commit b7eebc11b2
18 changed files with 937 additions and 2 deletions

View File

@@ -0,0 +1,116 @@
# 变更记录DX12 初始框架
**提交日期**: 2026-03-26
**提交哈希**: `60f73b5`
**变更类型**: 初始化项目
---
## 变更概述
本次提交是项目的初始版本,建立了完整的引擎基础框架,包括组件系统、平台抽象层、内容加载器和测试框架。
## 新增模块
### Engine/Common/
| 文件 | 说明 |
|------|------|
| `CommonHeader.h` | 公共头文件,定义基础类型和宏 |
| `Id.h` | 强类型 ID 系统 |
| `XEnginType.h` | 引擎类型定义 |
### Engine/Components/
| 文件 | 说明 |
|------|------|
| `Entity.cpp/.h` | 实体组件实现 |
| `Script.cpp/.h` | 脚本组件实现 |
| `Transform.cpp/.h` | 变换组件实现 |
### Engine/EngineAPI/
| 文件 | 说明 |
|------|------|
| `Camera.h` | 相机 API |
| `GameEntity.h` | 游戏实体 API |
| `Light.h` | 光源 API |
| `ScriptComponent.h` | 脚本组件 API |
| `TransformComponent.h` | 变换组件 API |
### Engine/Platform/
| 文件 | 说明 |
|------|------|
| `Platform.h` | 平台抽象接口 |
| `PlatformTypes.h` | 平台类型定义 |
| `PlatformWin32.cpp` | Win32 平台实现 |
| `Window.cpp/.h` | 窗口管理 |
### Engine/Content/
| 文件 | 说明 |
|------|------|
| `ContentLoader.cpp/.h` | 内容加载器 |
| `ContentToEngine.cpp/.h` | 内容到引擎转换 |
### Engine/Utilities/
| 文件 | 说明 |
|------|------|
| `FreeList.h` | 空闲列表内存池 |
| `IOStream.h` | IO 流工具 |
| `Math.h` | 数学工具 |
| `MathTypes.h` | 数学类型 |
| `Vector.h` | 向量容器 |
| `Utilities.h` | 通用工具 |
### ContentTools/
| 文件 | 说明 |
|------|------|
| `FbxImporter.cpp/.h` | FBX 模型导入 |
| `Geometry.cpp/.h` | 几何处理 |
| `MeshPrimitives.cpp/.h` | 网格图元 |
### EngineTest/
| 文件 | 说明 |
|------|------|
| `Main.cpp` | 测试入口 |
| `Test.h` | 测试框架基类 |
| `TestEntityComponent.h` | 实体组件测试 |
| `ShaderComponents.cpp/.h` | 着色器组件测试 |
| `Lights.cpp` | 光源测试 |
| `RenderItem.cpp` | 渲染项测试 |
---
## 核心设计
### 1. 强类型 ID 系统
```cpp
DEFINE_TYPED_ID(id_type);
```
通过宏生成类型安全的 ID支持代数校验防止使用已删除对象。
### 2. 组件系统架构
- **EngineAPI 层**: 对外契约,暴露稳定接口
- **Components 层**: 运行时实现,管理内部存储
### 3. 平台抽象
Win32 平台实现封装,上层代码通过抽象接口访问平台功能。
---
## 相关文档
- [Id机制分析](../架构分析/Id机制分析.md)
- [Entity组件分析](../架构分析/Entity组件分析.md)
- [Script组件分析](../架构分析/Script组件分析.md)
- [Transform组件分析](../架构分析/Transform组件分析.md)
- [项目约定规范](../架构分析/项目约定规范.md)