Files
GhostEngine/Ghost.Graphics/RHI/ISwapChain.cs
Misaki 28c386b0bb Refactor D3D12 Resource Management
Refactored and renamed components related to D3D12 graphics programming, replacing "descriptor" with "viewGroup" to improve resource grouping and management. Updated `D3D12CommandBuffer`, `D3D12DescriptorAllocator`, and `D3D12PipelineLibrary` to reflect these changes. Simplified material and shader creation in `D3D12ResourceAllocator`. Enhanced `D3D12ResourceDatabase` with resource naming for debugging and improved management. Refactored `Shader` and `ShaderPass` to use modern C# features and `IResourceReleasable` interface. Introduced `D3D12Utility` for centralized utility methods. Updated `Material` class for efficient buffer creation. Renamed `ShaderCompiler` to `SDLCompiler` with improved error handling. Updated `MeshRenderPass` to use new shader compilation process. Various improvements in error handling, code readability, and utility methods.
2025-10-23 14:42:53 +09:00

53 lines
1.1 KiB
C#

using Ghost.Core;
using Ghost.Graphics.Data;
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>
/// Number of back buffers
/// </summary>
public uint BufferCount
{
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);
}