749 B
749 B
OpenGLRenderPass::Shutdown
void Shutdown() override;
作用
清空 OpenGLRenderPass 当前保存的附件元数据。
当前实现行为
- 清空
m_colorAttachments。 - 把
m_colorAttachmentCount设回0。 - 把
m_hasDepthStencil设回false。 - 不会主动修改
m_depthStencilAttachment的历史内容,但由于m_hasDepthStencil被清零,后续接口不会再把它暴露出去。
使用建议
- 可以安全重复调用;测试中也覆盖了 double shutdown 的路径。
- 调用后,之前通过
GetColorAttachments()或GetDepthStencilAttachment()获取的指针都不应继续使用。