D3D12 Core: - Implement complete device initialization flow - Add debug layer enablement in DEBUG mode - Add GPU adapter enumeration and selection - Add feature level checking (min 11.0) - Add DXCall and NAME_D3D12_OBJECT macros - Add release template function - Configure info queue for error/warning breakpoints Documentation: - Add changelog for D3D12 device initialization - Update D3D12 Wiki with current implementation status - Add Doxygen comments to Renderer and platform interface
30 lines
715 B
C++
30 lines
715 B
C++
#pragma once
|
|
|
|
/**
|
|
* @brief Direct3D 12 核心类
|
|
* @details 定义了 Direct3D 12 核心功能的初始化与关闭函数
|
|
*/
|
|
namespace XEngine::graphics::d3d12::core{
|
|
/**
|
|
* @brief 初始化 Direct3D 12 核心功能
|
|
* @details 调用 DXGI 接口,确定要使用的 GPU 并创建 Direct3D 12 设备
|
|
* @return true 如果初始化成功,否则返回 false
|
|
*/
|
|
bool initialize();
|
|
/**
|
|
* @brief 关闭 Direct3D 12 核心功能
|
|
* @details 调用 Direct3D 12 设备的关闭函数,释放所有资源
|
|
*/
|
|
void shutdown();
|
|
|
|
template<typename T>
|
|
constexpr void release(T*& resource)
|
|
{
|
|
if(resource)
|
|
{
|
|
resource->Release();
|
|
resource = nullptr;
|
|
}
|
|
}
|
|
|
|
}// namespace XEngine::graphics::d3d12
|