docs: 重构 API 文档结构并修正源码准确性
- 重组文档目录结构: 每个模块的概述页移动到模块子目录 - 重命名 index.md 为 main.md - 修正所有模块文档中的错误: - math: FromEuler→FromEulerAngles, TransformDirection 包含缩放, Box 是 OBB, Color::ToRGBA 格式 - containers: 新增 operator==/!= 文档, 补充 std::hash DJB 算法细节 - core: 修复 types 链接错误 - debug: LogLevelToString 返回大写, timestamp 是秒, Profiler 空实现标注, Windows API vs ANSI - memory: 修复头文件路径, malloc vs operator new, 新增方法文档 - resources: 修复 Shader/Texture 链接错误 - threading: TaskSystem::Wait 空实现标注, ReadWriteLock 重入描述, LambdaTask 链接 - 验证: fix_links.py 确认 0 个断裂引用
This commit is contained in:
165
docs/api/rhi/d3d12/device/methods.md
Normal file
165
docs/api/rhi/d3d12/device/methods.md
Normal file
@@ -0,0 +1,165 @@
|
||||
# D3D12Device 方法
|
||||
|
||||
## 继承方法
|
||||
|
||||
### Initialize
|
||||
|
||||
```cpp
|
||||
bool Initialize(const RHIDeviceDesc& desc) override;
|
||||
```
|
||||
|
||||
初始化 D3D12 设备。
|
||||
|
||||
### Shutdown
|
||||
|
||||
```cpp
|
||||
void Shutdown() override;
|
||||
```
|
||||
|
||||
关闭设备。
|
||||
|
||||
### CreateBuffer
|
||||
|
||||
```cpp
|
||||
RHIBuffer* CreateBuffer(const BufferDesc& desc) override;
|
||||
```
|
||||
|
||||
创建 D3D12 缓冲区。
|
||||
|
||||
### CreateTexture
|
||||
|
||||
```cpp
|
||||
RHITexture* CreateTexture(const TextureDesc& desc) override;
|
||||
```
|
||||
|
||||
创建 D3D12 纹理。
|
||||
|
||||
### CreateSwapChain
|
||||
|
||||
```cpp
|
||||
RHISwapChain* CreateSwapChain(const SwapChainDesc& desc) override;
|
||||
```
|
||||
|
||||
创建 D3D12 交换链。
|
||||
|
||||
### CreateCommandList
|
||||
|
||||
```cpp
|
||||
RHICommandList* CreateCommandList(const CommandListDesc& desc) override;
|
||||
```
|
||||
|
||||
创建 D3D12 命令列表。
|
||||
|
||||
### CreateCommandQueue
|
||||
|
||||
```cpp
|
||||
RHICommandQueue* CreateCommandQueue(const CommandQueueDesc& desc) override;
|
||||
```
|
||||
|
||||
创建 D3D12 命令队列。
|
||||
|
||||
### CompileShader
|
||||
|
||||
```cpp
|
||||
RHIShader* CompileShader(const ShaderCompileDesc& desc) override;
|
||||
```
|
||||
|
||||
编译 D3D12 着色器。
|
||||
|
||||
### CreatePipelineState
|
||||
|
||||
```cpp
|
||||
RHIPipelineState* CreatePipelineState(const PipelineStateDesc& desc) override;
|
||||
```
|
||||
|
||||
创建 D3D12 管线状态对象。
|
||||
|
||||
### CreateFence
|
||||
|
||||
```cpp
|
||||
RHIFence* CreateFence(const FenceDesc& desc) override;
|
||||
```
|
||||
|
||||
创建 D3D12 栅栏。
|
||||
|
||||
### CreateSampler
|
||||
|
||||
```cpp
|
||||
RHISampler* CreateSampler(const SamplerDesc& desc) override;
|
||||
```
|
||||
|
||||
创建 D3D12 采样器。
|
||||
|
||||
### GetCapabilities
|
||||
|
||||
```cpp
|
||||
const RHICapabilities& GetCapabilities() const override;
|
||||
```
|
||||
|
||||
获取设备能力。
|
||||
|
||||
### GetDeviceInfo
|
||||
|
||||
```cpp
|
||||
const RHIDeviceInfo& GetDeviceInfo() const override;
|
||||
```
|
||||
|
||||
获取设备信息。
|
||||
|
||||
### GetNativeDevice
|
||||
|
||||
```cpp
|
||||
void* GetNativeDevice() override;
|
||||
```
|
||||
|
||||
获取原生 D3D12 设备指针。
|
||||
|
||||
## D3D12 特有方法
|
||||
|
||||
### GetDevice
|
||||
|
||||
```cpp
|
||||
ID3D12Device* GetDevice() const;
|
||||
```
|
||||
|
||||
获取 `ID3D12Device` 接口。
|
||||
|
||||
### GetFactory
|
||||
|
||||
```cpp
|
||||
IDXGIFactory4* GetFactory() const;
|
||||
```
|
||||
|
||||
获取 `IDXGIFactory4` 接口。
|
||||
|
||||
### GetAdapterInfo
|
||||
|
||||
```cpp
|
||||
const AdapterInfo& GetAdapterInfo() const;
|
||||
```
|
||||
|
||||
获取适配器信息。
|
||||
|
||||
### EnumerateAdapters
|
||||
|
||||
```cpp
|
||||
std::vector<AdapterInfo> EnumerateAdapters();
|
||||
```
|
||||
|
||||
枚举所有适配器。
|
||||
|
||||
### GetDescriptorHandleIncrementSize
|
||||
|
||||
```cpp
|
||||
UINT GetDescriptorHandleIncrementSize(DescriptorHeapType type) const;
|
||||
```
|
||||
|
||||
获取描述符句柄增量大小。
|
||||
|
||||
### CheckFeatureSupport
|
||||
|
||||
```cpp
|
||||
bool CheckFeatureSupport(D3D12_FEATURE feature, void* featureSupportData, uint32_t featureSupportDataSize);
|
||||
```
|
||||
|
||||
检查功能支持。
|
||||
Reference in New Issue
Block a user