Implemented a transient render graph system as a proof of concept, including resource aliasing, pass culling, and typed pass data. Added new project `Ghost.RenderGraph.Concept` targeting `.NET 10.0`. Refactored graphics-related components: - Simplified resource state transitions in `RenderingContext`. - Improved resize handling in `GraphicsTestWindow`. - Updated `D3D12GraphicsEngine` to streamline frame rendering. - Enhanced `D3D12ResourceDatabase` and `D3D12SwapChain` for better resource management. Added detailed documentation: - `ALIASING.md` explains resource aliasing techniques. - `API_DESIGN.md` outlines the render graph API design. Updated solution to include the new render graph project.
45 lines
1.0 KiB
C#
45 lines
1.0 KiB
C#
using Ghost.Core;
|
|
using Ghost.Graphics.Core;
|
|
|
|
namespace Ghost.Graphics.RHI;
|
|
|
|
/// <summary>
|
|
/// Swap chain interface for presentation
|
|
/// </summary>
|
|
public interface ISwapChain : IDisposable
|
|
{
|
|
/// <summary>
|
|
/// Width of the swap chain back buffers
|
|
/// </summary>
|
|
public uint Width
|
|
{
|
|
get;
|
|
}
|
|
|
|
/// <summary>
|
|
/// Height of the swap chain back buffers
|
|
/// </summary>
|
|
public uint Height
|
|
{
|
|
get;
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the current back buffer texture
|
|
/// </summary>
|
|
/// <returns>Current back buffer texture</returns>
|
|
public Handle<Texture> GetCurrentBackBuffer();
|
|
|
|
/// <summary>
|
|
/// Presents the rendered frame
|
|
/// </summary>
|
|
/// <param name="vsync">Enable vertical synchronization</param>
|
|
public void Present(bool vsync = true);
|
|
|
|
/// <summary>
|
|
/// Resizes the swap chain back buffers
|
|
/// </summary>
|
|
/// <param name="width">New Width</param>
|
|
/// <param name="height">New Height</param>
|
|
public void Resize(uint width, uint height);
|
|
} |