feat(srp): formalize renderer contracts and project feature bridge

This commit is contained in:
2026-04-20 15:03:45 +08:00
parent 10b092d467
commit a615f78e72
13 changed files with 1604 additions and 28 deletions

View File

@@ -6,6 +6,7 @@ namespace XCEngine.Rendering.Universal
public abstract class ScriptableRendererFeature
{
private bool m_disposed;
private bool m_runtimeCreated;
protected ScriptableRendererFeature()
{
@@ -13,6 +14,18 @@ namespace XCEngine.Rendering.Universal
public bool isActive { get; set; } = true;
internal void CreateInstance()
{
if (m_runtimeCreated)
{
return;
}
m_disposed = false;
Create();
m_runtimeCreated = true;
}
internal void ReleaseRuntimeResourcesInstance()
{
if (m_disposed)
@@ -22,6 +35,7 @@ namespace XCEngine.Rendering.Universal
ReleaseRuntimeResources();
m_disposed = true;
m_runtimeCreated = false;
}
public virtual void Create()