using Ghost.Core;
using Ghost.Graphics.Core;
namespace Ghost.Graphics.RHI;
///
/// Swap chain interface for presentation
///
public interface ISwapChain : IDisposable
{
///
/// Width of the swap chain back buffers
///
uint Width
{
get;
}
///
/// Height of the swap chain back buffers
///
uint Height
{
get;
}
///
/// Gets the horizontal scaling factor applied to the object. This is used for DPI scaling.
///
float ScaleX
{
get;
}
///
/// Gets the vertical scale factor applied to the object. This is used for DPI scaling.
///
float ScaleY
{
get;
}
///
/// Gets the current back buffer texture
///
/// Current back buffer texture
Handle GetCurrentBackBuffer();
///
/// Gets all back buffer textures
///
/// AlowBufferAndTexture back buffer textures
ReadOnlySpan> GetBackBuffers();
///
/// Presents the rendered frame
///
/// Enable vertical synchronization
void Present(bool vsync = true);
///
/// Resizes the swap chain back buffers
///
/// New Width
/// New Height
void Resize(uint width, uint height);
///
/// Sets the horizontal and vertical scaling factors for the object.
///
/// The factor by which to scale the object along the X-axis.
/// The factor by which to scale the object along the Y-axis.
void SetScale(float scaleX, float scaleY);
}