forked from Misaki/GhostEngine
- Updated dependencies, including `Misaki.HighPerformance` and `TerraFX.Interop`. - Refactored `Result` struct for better error handling and chaining. - Removed `Ptr<T>` struct as it was no longer necessary. - Enhanced `Win32Utility` with `Attach` and `Dispose` methods. - Improved `ProjectService` and `AppStateMachine` with `Result` integration. - Refactored `IShaderCompiler` to support SPIR-V cross-compilation and pass-level compilation. - Standardized Direct3D12 resource management with `UniquePtr` and added `D3D12Object` base class. - Improved shader reflection validation and pipeline creation in `D3D12PipelineLibrary`. - Updated `SDLCompiler` for better error handling during shader generation. - Enhanced logging, debugging, and code readability across the codebase. - Performed general code cleanup, including unused namespace removal and naming consistency.
65 lines
1.5 KiB
C#
65 lines
1.5 KiB
C#
using Ghost.Graphics.Contracts;
|
|
|
|
namespace Ghost.Graphics.RHI;
|
|
|
|
public interface IGraphicsEngine : IDisposable
|
|
{
|
|
IRenderDevice Device
|
|
{
|
|
get;
|
|
}
|
|
|
|
IShaderCompiler ShaderCompiler
|
|
{
|
|
get;
|
|
}
|
|
|
|
IPipelineLibrary PipelineLibrary
|
|
{
|
|
get;
|
|
}
|
|
|
|
IResourceDatabase ResourceDatabase
|
|
{
|
|
get;
|
|
}
|
|
|
|
IResourceAllocator ResourceAllocator
|
|
{
|
|
get;
|
|
}
|
|
|
|
IRenderer CreateRenderer();
|
|
void RemoveRenderer(IRenderer renderer);
|
|
void ClearRenderers();
|
|
|
|
/// <summary>
|
|
/// Creates a command buffer for recording rendering commands
|
|
/// </summary>
|
|
/// <param name="type">Type of command buffer to create</param>
|
|
/// <returns>A new command buffer instance</returns>
|
|
ICommandBuffer CreateCommandBuffer(CommandBufferType type = CommandBufferType.Graphics);
|
|
|
|
/// <summary>
|
|
/// Creates a swap chain for presentation
|
|
/// </summary>
|
|
/// <param name="desc">Swap chain description</param>
|
|
/// <returns>A new swap chain instance</returns>
|
|
ISwapChain CreateSwapChain(SwapChainDesc desc);
|
|
|
|
/// <summary>
|
|
/// Begins a new rendering frame, preparing the graphics context for drawing operations.
|
|
/// </summary>
|
|
void BeginFrame();
|
|
|
|
/// <summary>
|
|
/// Renders the current frame.
|
|
/// </summary>
|
|
void RenderFrame();
|
|
|
|
/// <summary>
|
|
/// Completes the current rendering frame and performs any necessary finalization steps.
|
|
/// </summary>
|
|
void EndFrame();
|
|
}
|