Files
XCEngine/docs/api/rhi/render-pass/get-depth-stencil-attachment.md
ssdfasd 1cf744b755 refactor(docs): RHI模块文档重构 - 修复18处链接错误并新增RHIFramebuffer/RHIRenderPass文档
- 修复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分类
2026-03-26 01:29:00 +08:00

745 B

RHIRenderPass::GetDepthStencilAttachment

获取深度模板附件描述。

virtual const AttachmentDesc* GetDepthStencilAttachment() const = 0;

返回渲染通道初始化时配置的深度模板附件描述。如果渲染通道未配置深度模板附件,返回 nullptr

返回: const AttachmentDesc* - 深度模板附件描述指针,未配置时返回 nullptr

线程安全:

注意:

  • 返回的指针在渲染通道生命周期内有效
  • 不要尝试修改返回的描述数据

示例:

const AttachmentDesc* depthStencil = renderPass->GetDepthStencilAttachment();
if (depthStencil != nullptr) {
    Format format = depthStencil->format;
    // 处理深度模板配置
}