Refactoring rendering system.

Added new IRenderSystem and IFenceSynchronizer

Changed IRenderer managment from RenderSystem to IGraphicsEngine
This commit is contained in:
2025-11-07 16:46:21 +09:00
parent 15aca9aefb
commit 56f73e774b
8 changed files with 216 additions and 94 deletions

View File

@@ -10,6 +10,14 @@ using Ghost.Graphics.Core;
namespace Ghost.Graphics.RHI;
public interface IRHIObject
{
string Name
{
get; set;
}
}
public readonly struct ShaderPassKey
{
public readonly ulong value;

View File

@@ -23,6 +23,8 @@ public interface IGraphicsEngine : IDisposable
}
IRenderer CreateRenderer();
void RemoveRenderer(IRenderer renderer);
void ClearRenderers();
/// <summary>
/// Creates a command buffer for recording rendering commands
@@ -43,6 +45,11 @@ public interface IGraphicsEngine : IDisposable
/// </summary>
void BeginFrame();
/// <summary>
/// Renders the current frame.
/// </summary>
void RenderFrame();
/// <summary>
/// Completes the current rendering frame and performs any necessary finalization steps.
/// </summary>

View File

@@ -49,10 +49,4 @@ public interface IResourceAllocator
/// <returns>An <see cref="Identifier{Shader}"/> representing the newly created shader.</returns>
/// <param name="descriptor">The viewGroup containing the shader's properties and passes.</param>
public Identifier<Shader> CreateShader(ShaderDescriptor descriptor);
/// <summary>
/// Release a resource given its handle
/// </summary>
/// <param name="handle">Resource handle</param>
public void ReleaseResource(Handle<GPUResource> handle);
}
}