using Ghost.Graphics.Data; namespace Ghost.Graphics.RHI; public interface IResourceAllocator { /// /// Creates a texture resource /// /// Texture description /// A new texture handle point to the resource public TextureHandle CreateTexture(ref readonly TextureDesc desc, bool tempResource = false); /// /// Creates a render target for off-screen rendering /// /// Render target description /// A new render target instance public TextureHandle CreateRenderTarget(ref readonly RenderTargetDesc desc, bool tempResource = false); /// /// Creates a buffer resource /// /// Buffer description /// A new buffer handle point to the resource public BufferHandle CreateBuffer(ref readonly BufferDesc desc, bool tempResource = false); /// /// Release a resource given its handle /// /// Resource handle public void ReleaseResource(ResourceHandle handle); }