- 修复opengl/下13个文件对overview.md的错误引用,改为opengl.md - 修复opengl/shader/下2处get-native-handle.md的错误路径引用 - 修复rhi.md中rhifactory路径错误 - 修复opengl.md中对d3d12.md的错误引用 - 修复opengl/README.md中的overview.md引用 - 新增RHIFramebuffer完整文档(7个文件) - 新增RHIRenderPass完整文档(7个文件) - 更新rhi.md总览页,添加RHIFramebuffer和RHIRenderPass分类
28 lines
745 B
Markdown
28 lines
745 B
Markdown
# RHIRenderPass::GetDepthStencilAttachment
|
|
|
|
获取深度模板附件描述。
|
|
|
|
```cpp
|
|
virtual const AttachmentDesc* GetDepthStencilAttachment() const = 0;
|
|
```
|
|
|
|
返回渲染通道初始化时配置的深度模板附件描述。如果渲染通道未配置深度模板附件,返回 `nullptr`。
|
|
|
|
**返回:** `const AttachmentDesc*` - 深度模板附件描述指针,未配置时返回 `nullptr`
|
|
|
|
**线程安全:** ✅
|
|
|
|
**注意:**
|
|
- 返回的指针在渲染通道生命周期内有效
|
|
- 不要尝试修改返回的描述数据
|
|
|
|
**示例:**
|
|
|
|
```cpp
|
|
const AttachmentDesc* depthStencil = renderPass->GetDepthStencilAttachment();
|
|
if (depthStencil != nullptr) {
|
|
Format format = depthStencil->format;
|
|
// 处理深度模板配置
|
|
}
|
|
```
|