Add URP RenderGraph API compatibility surface

This commit is contained in:
2026-04-25 15:51:05 +08:00
parent c0c0bbdfa3
commit 5f73b35c0f
8 changed files with 246 additions and 20 deletions

View 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);
}
}
}