35 lines
806 B
C#
35 lines
806 B
C#
using System;
|
|
|
|
namespace XCEngine.Rendering.RenderGraphModule
|
|
{
|
|
public sealed class RenderGraph
|
|
{
|
|
private readonly XCEngine.Rendering.ScriptableRenderContext
|
|
m_context;
|
|
|
|
public RenderGraph()
|
|
: this(null)
|
|
{
|
|
}
|
|
|
|
public RenderGraph(
|
|
XCEngine.Rendering.ScriptableRenderContext context)
|
|
{
|
|
m_context = context;
|
|
}
|
|
|
|
public XCEngine.Rendering.RenderGraphRasterPassBuilder
|
|
AddRasterPass(
|
|
string passName)
|
|
{
|
|
if (m_context == null)
|
|
{
|
|
throw new InvalidOperationException(
|
|
"RenderGraph is not bound to a recording context.");
|
|
}
|
|
|
|
return m_context.AddRasterPass(passName);
|
|
}
|
|
}
|
|
}
|