- 改用 utl::free_list 管理 surface,避免 vector 扩容导致的资源重复释放 - 为 d3d12_surface 添加移动语义,禁用拷贝构造 - 添加撕裂检测支持(DXGI_PRESENT_ALLOW_TEARING) - 为 FreeList.h 和 Vector.h 添加完整的 Doxygen 中文注释 - 更新 D3D12 学习 Wiki,添加 free_list 章节
26 lines
614 B
C++
26 lines
614 B
C++
#pragma once
|
|
#include "CommonHeader.h"
|
|
#include "Platform/Window.h"
|
|
#include "Renderer.h"
|
|
|
|
namespace XEngine::graphics{
|
|
/**
|
|
* @brief 平台接口结构体
|
|
* @details 定义了图形渲染平台的初始化与关闭函数指针
|
|
*/
|
|
struct platform_interface{
|
|
bool(*initialize)(void);
|
|
void(*shutdown)(void);
|
|
|
|
struct {
|
|
surface(*create)(platform::window);
|
|
void(*remove)(surface_id);
|
|
void(*resize)(surface_id, u32, u32);
|
|
u32(*width)(surface_id);
|
|
u32(*height)(surface_id);
|
|
void(*render)(surface_id);
|
|
} surface;
|
|
};
|
|
}// namespace XEngine::graphics
|
|
|