docs: 修复 D3D12 后端 API 文档问题
- 修复 texture/dtor.md 和 enums/enums.md 的错误链接 - 重命名 texture/ctor.md → constructor.md, texture/dtor.md → destructor.md - 创建 command-list, fence, device, query-heap, sampler 的 constructor/destructor 文档 - 创建 D3D12Texture 缺失的 16 个方法文档 - 创建 D3D12CommandList 缺失的 12 个 internal 方法文档 - 补充 shader-resource-view 缺少的头文件和类型字段
This commit is contained in:
34
docs/api/rhi/d3d12/command-list/clear-render-target-view.md
Normal file
34
docs/api/rhi/d3d12/command-list/clear-render-target-view.md
Normal file
@@ -0,0 +1,34 @@
|
||||
# D3D12CommandList::ClearRenderTargetView
|
||||
|
||||
清除渲染目标视图(资源指针重载)。
|
||||
|
||||
```cpp
|
||||
void ClearRenderTargetView(ID3D12Resource* renderTarget, const float color[4], uint32_t rectCount = 0, const D3D12_RECT* rects = nullptr);
|
||||
```
|
||||
|
||||
## 参数
|
||||
|
||||
- `renderTarget` - D3D12 资源指针
|
||||
- `color` - 清除颜色 RGBA
|
||||
- `rectCount` - 矩形数量(默认为0表示整个资源)
|
||||
- `rects` - 要清除的矩形数组(默认为nullptr表示整个资源)
|
||||
|
||||
## 返回值
|
||||
|
||||
无
|
||||
|
||||
**线程安全:** ❌
|
||||
|
||||
**复杂度:** O(n)
|
||||
|
||||
## 示例
|
||||
|
||||
```cpp
|
||||
float color[4] = { 0.0f, 0.0f, 0.0f, 1.0f };
|
||||
commandList.ClearRenderTargetView(renderTarget.GetResource(), color);
|
||||
```
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [D3D12CommandList 总览](command-list.md)
|
||||
- [ClearRenderTarget](clear-render-target.md) - 清除渲染目标
|
||||
Reference in New Issue
Block a user