using System; namespace XCEngine { public sealed class ScriptableRenderPipelinePlanningContext { private readonly ulong m_nativeHandle; internal ScriptableRenderPipelinePlanningContext(ulong nativeHandle) { m_nativeHandle = nativeHandle; } public void ClearPostProcessStage() { InternalCalls.Rendering_ScriptableRenderPipelinePlanningContext_ClearPostProcessStage( m_nativeHandle); } public void RequestPostProcessStage( CameraFrameColorSource source, bool usesGraphManagedOutputColor) { if (source == CameraFrameColorSource.ExplicitSurface) { throw new ArgumentException( "Managed planning currently requires a graph-managed source for post-process stages.", nameof(source)); } if (!InternalCalls .Rendering_ScriptableRenderPipelinePlanningContext_RequestPostProcessStage( m_nativeHandle, (int)source, usesGraphManagedOutputColor)) { throw new InvalidOperationException( "Failed to request the managed post-process stage."); } } public void ClearFinalOutputStage() { InternalCalls.Rendering_ScriptableRenderPipelinePlanningContext_ClearFinalOutputStage( m_nativeHandle); } public void RequestFinalOutputStage( CameraFrameColorSource source) { if (source == CameraFrameColorSource.ExplicitSurface) { throw new ArgumentException( "Managed planning currently requires a graph-managed source for final-output stages.", nameof(source)); } if (!InternalCalls .Rendering_ScriptableRenderPipelinePlanningContext_RequestFinalOutputStage( m_nativeHandle, (int)source)) { throw new InvalidOperationException( "Failed to request the managed final-output stage."); } } } }