feat(d3d12): 实现交换链与渲染表面管理

- 新增 d3d12_surface 类,管理交换链和渲染目标
- 实现三重缓冲后台缓冲区管理
- 添加视口和裁剪矩形配置
- 修复 GraphicsPlatformInterface.h 循环包含问题
- 添加完整的中文 Doxygen 注释
- 更新 D3D12 学习 Wiki,添加交换链章节
This commit is contained in:
SpecialX
2026-03-31 11:12:11 +08:00
parent b6c0211d6a
commit 95d8893182
14 changed files with 840 additions and 27 deletions

View File

@@ -1,10 +1,15 @@
#pragma once
#pragma once
#include "D3D12CommonHeader.h"
/**
* @brief Direct3D 12 核心类
* @details 定义了 Direct3D 12 核心功能的初始化与关闭函数
*/
namespace XEngine::graphics::d3d12 {
class descriptor_heap;
}
namespace XEngine::graphics::d3d12::core{
/**
* @brief 初始化 Direct3D 12 核心功能
@@ -81,10 +86,24 @@ ID3D12Device *const device();
*/
u32 current_frame_index();
descriptor_heap& rtv_heap();
descriptor_heap& dsv_heap();
descriptor_heap& srv_heap();
descriptor_heap& uav_heap();
/**
* @brief 获取默认渲染目标格式
* @details 返回 Direct3D 12 设备的默认渲染目标格式
* @return DXGI_FORMAT 默认渲染目标格式
*/
DXGI_FORMAT default_render_target_format();
/**
* @brief 设置延迟释放标志
* @details 用于在渲染循环中设置延迟释放标志,通知资源管理器在当前帧渲染完成后释放资源
*/
void set_deferred_release_flag();
}// namespace XEngine::graphics::d3d12::core