class
render::IRenderWindowSurface
Interface that acts as a bridge between a RenderWindow and a GpuBackend.
One such interface should be implemented for each GPU backend. Internally creates the swap chain that allows the GPU to render to the window.
Public
Constructors
IRenderWindowSurface
IRenderWindowSurface() = default
Methods
~IRenderWindowSurface
virtual ~IRenderWindowSurface() = default
RebuildSwapChain
virtual void RebuildSwapChain(u32 width, u32 height, bool vsync) = 0
Rebuilds the swap chain with new properties.
SwapBuffers
Presents the current back-buffer image, and acquires the next swap chain image for rendering.
MarkSwapChainAsInvalid
virtual void MarkSwapChainAsInvalid() = 0
Marks the swap chain as invalid, so the systems knows to rebuild it on the next occasion.
Destroy
virtual void Destroy() = 0
Releases any resources associated with the surface.
ReadAsync
Reads the contents of the current swap chain image.
Issues copy commands into the command buffer and returns an async operation that triggers when read is complete.
- commandBuffer
- Command buffer to issue copy commands into.
Returns: Async operation that completes when read is complete.