feat(engine): refactor resource mgmt & render pipeline

Refactors engine infrastructure for improved resource/service
management and render pipeline extensibility. Replaces World’s
resource API with a service-based API. Splits IGraphicsEngine’s
RenderFrame into BeginFrame/EndFrame. Adds support for pluggable
render pipelines in RenderSystem. Replaces disposed checks with
Debug.Assert in performance paths. Updates RenderExtractionSystem
and render loop for new APIs. Improves diagnostics and code clarity.

BREAKING CHANGE: Resource API replaced with service API; render
pipeline and frame lifecycle interfaces changed.
This commit is contained in:
2026-03-22 21:04:05 +09:00
parent 37f4795b4f
commit 2b3bf21a74
16 changed files with 198 additions and 119 deletions

View File

@@ -1,13 +1,14 @@
using Ghost.Graphics.Core;
using Ghost.Graphics.RenderGraphModule;
using Ghost.Graphics.RHI;
using System.Diagnostics;
using System.Runtime.CompilerServices;
namespace Ghost.Graphics.RenderPipeline;
public sealed class GhostRenderPipelineSettings : IRenderPipelineSettings
{
public static IRenderPipeline CreatePipeline(RenderSystem renderSystem)
public IRenderPipeline CreatePipeline(RenderSystem renderSystem)
{
return new GhostRenderPipeline(renderSystem);
}
@@ -24,6 +25,7 @@ public unsafe partial class GhostRenderPipeline : IRenderPipeline
Dispose();
}
[Conditional("DEBUG")]
[MethodImpl(MethodImplOptions.AggressiveInlining)]
protected void ThrowIfDisposed()
{

View File

@@ -5,7 +5,7 @@ namespace Ghost.Graphics.RenderPipeline;
public interface IRenderPipelineSettings
{
static abstract IRenderPipeline CreatePipeline(RenderSystem renderSystem);
IRenderPipeline CreatePipeline(RenderSystem renderSystem);
}
public interface IRenderPipeline : IDisposable