Add URP RenderGraph API compatibility surface
This commit is contained in:
34
managed/XCEngine.ScriptCore/Rendering/Graph/RenderGraph.cs
Normal file
34
managed/XCEngine.ScriptCore/Rendering/Graph/RenderGraph.cs
Normal file
@@ -0,0 +1,34 @@
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user