Files
XCEngine/docs/api/XCEngine/RHI/OpenGL/OpenGLRenderPass/Shutdown.md

749 B

OpenGLRenderPass::Shutdown

void Shutdown() override;

作用

清空 OpenGLRenderPass 当前保存的附件元数据。

当前实现行为

  • 清空 m_colorAttachments
  • m_colorAttachmentCount 设回 0
  • m_hasDepthStencil 设回 false
  • 不会主动修改 m_depthStencilAttachment 的历史内容,但由于 m_hasDepthStencil 被清零,后续接口不会再把它暴露出去。

使用建议

  • 可以安全重复调用;测试中也覆盖了 double shutdown 的路径。
  • 调用后,之前通过 GetColorAttachments()GetDepthStencilAttachment() 获取的指针都不应继续使用。

相关文档