Pyrogenesis HEAD
Pyrogenesis, a RTS Engine
Renderer::Backend::ISwapChain Class Referenceabstract

#include <ISwapChain.h>

Inheritance diagram for Renderer::Backend::ISwapChain:
Collaboration diagram for Renderer::Backend::ISwapChain:

Public Member Functions

virtual bool IsValid () const =0
 
virtual bool AcquireNextBackbuffer ()=0
 Acquires a backbuffer for rendering a frame. More...
 
virtual IFramebuffer * GetCurrentBackbuffer (const AttachmentLoadOp colorAttachmentLoadOp, const AttachmentStoreOp colorAttachmentStoreOp, const AttachmentLoadOp depthStencilAttachmentLoadOp, const AttachmentStoreOp depthStencilAttachmentStoreOp)=0
 Returns a framebuffer for the current backbuffer with the required attachment operations. More...
 
virtual void Present ()=0
 Presents the backbuffer to the swapchain queue to be flipped on a screen. More...
 
- Public Member Functions inherited from Renderer::Backend::IDeviceObject< ISwapChain >
virtual ~IDeviceObject ()
 
virtual IDevice * GetDevice ()=0
 
T * As ()
 

Member Function Documentation

◆ AcquireNextBackbuffer()

virtual bool Renderer::Backend::ISwapChain::AcquireNextBackbuffer ( )
pure virtual

Acquires a backbuffer for rendering a frame.

Returns
True if it was successfully acquired and we can render to it.

Implemented in Renderer::Backend::Dummy::CSwapChain, Renderer::Backend::GL::CSwapChain, and Renderer::Backend::Vulkan::CSwapChain.

◆ GetCurrentBackbuffer()

virtual IFramebuffer * Renderer::Backend::ISwapChain::GetCurrentBackbuffer ( const AttachmentLoadOp  colorAttachmentLoadOp,
const AttachmentStoreOp  colorAttachmentStoreOp,
const AttachmentLoadOp  depthStencilAttachmentLoadOp,
const AttachmentStoreOp  depthStencilAttachmentStoreOp 
)
pure virtual

Returns a framebuffer for the current backbuffer with the required attachment operations.

It should not be called if the last AcquireNextBackbuffer call returned false.

It's guaranteed that for the same acquired backbuffer this function returns a framebuffer with the same attachments and properties except load and store operations.

Returns
The last successfully acquired framebuffer that wasn't presented.

Implemented in Renderer::Backend::Dummy::CSwapChain, Renderer::Backend::GL::CSwapChain, and Renderer::Backend::Vulkan::CSwapChain.

◆ IsValid()

virtual bool Renderer::Backend::ISwapChain::IsValid ( ) const
pure virtual
Returns
True if we still can use the swapchain to present. A swapchain can become invalid on window resize or some other system event.

Implemented in Renderer::Backend::Dummy::CSwapChain, Renderer::Backend::GL::CSwapChain, and Renderer::Backend::Vulkan::CSwapChain.

◆ Present()

virtual void Renderer::Backend::ISwapChain::Present ( )
pure virtual

Presents the backbuffer to the swapchain queue to be flipped on a screen.

Should be called only if the last AcquireNextBackbuffer call returned true.

Implemented in Renderer::Backend::Dummy::CSwapChain, Renderer::Backend::GL::CSwapChain, and Renderer::Backend::Vulkan::CSwapChain.


The documentation for this class was generated from the following file: