Refactoring Rendering backend
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
using Ghost.Graphics.RHI;
|
||||
using Ghost.Core;
|
||||
using Ghost.Graphics.Data;
|
||||
using Misaki.HighPerformance.Mathematics;
|
||||
|
||||
namespace Ghost.Graphics.RHI;
|
||||
|
||||
@@ -7,37 +9,42 @@ namespace Ghost.Graphics.RHI;
|
||||
/// </summary>
|
||||
public interface IRenderer : IDisposable
|
||||
{
|
||||
public uint2 Size
|
||||
{
|
||||
get;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sets the render target for this renderer
|
||||
/// </summary>
|
||||
/// <param name="renderTarget">Render target to render into</param>
|
||||
void SetRenderTarget(IRenderTarget? renderTarget);
|
||||
public void SetRenderTarget(Handle<Texture> renderTarget);
|
||||
|
||||
/// <summary>
|
||||
/// Sets the swap chain for this renderer
|
||||
/// </summary>
|
||||
/// <param name="swapChain">Swap chain for presentation</param>
|
||||
void SetSwapChain(ISwapChain? swapChain);
|
||||
public void SetSwapChain(ISwapChain? swapChain);
|
||||
|
||||
/// <summary>
|
||||
/// Executes any pending resize operations
|
||||
/// </summary>
|
||||
void ExecutePendingResize();
|
||||
public void ExecutePendingResize();
|
||||
|
||||
/// <summary>
|
||||
/// Renders a frame
|
||||
/// </summary>
|
||||
void Render();
|
||||
public void Render();
|
||||
|
||||
/// <summary>
|
||||
/// Requests a resize operation
|
||||
/// </summary>
|
||||
/// <param name="width">New width</param>
|
||||
/// <param name="height">New height</param>
|
||||
void RequestResize(uint width, uint height);
|
||||
public void RequestResize(uint width, uint height);
|
||||
|
||||
/// <summary>
|
||||
/// Waits for the GPU to complete all work
|
||||
/// </summary>
|
||||
void WaitIdle();
|
||||
public void WaitIdle();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user