Files
XCEngine/docs/api/XCEngine/Rendering/SceneRenderer/SetPipeline.md

33 lines
828 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# SceneRenderer::SetPipeline
```cpp
void SetPipeline(std::unique_ptr<RenderPipeline> pipeline);
```
## 行为说明
当前实现只是把调用转发给内部 `m_cameraRenderer`
```cpp
m_cameraRenderer.SetPipeline(std::move(pipeline));
```
## 当前语义
沿用 `CameraRenderer::SetPipeline()` 的规则:
- 当前绑定的 `RenderPipelineAsset` 会被清空。
- 被替换掉的旧 runtime pipeline 会先执行 `Shutdown()`
- 如果新传入的 `pipeline` 为空,内部会回退到默认 pipeline asset并重新创建默认主管线。
## 参数
- `pipeline` - 新的 runtime pipeline 所有权,可为空。
## 相关文档
- [SceneRenderer](SceneRenderer.md)
- [SetPipelineAsset](SetPipelineAsset.md)
- [GetPipeline](GetPipeline.md)
- [CameraRenderer::SetPipeline](../CameraRenderer/SetPipeline.md)