Skip to content

LiteFX::Rendering::FrameBuffer

Stores the images used by a RenderPass to either read from using input attachments or write to using render targets.

Synopsis

Declared in <litefx/rendering.hpp>

template<typename TImage>
requires std::derived_from<TImage, IImage>
class FrameBuffer
    : public virtual StateResource
    , public IFrameBuffer

Base Classes

NameDescription
StateResourceBase class for a resource that can be identified by a name string within a DeviceState.
IFrameBufferThe interface for a frame buffer.

Types

NameDescription
ReleasedEventArgs Event arguments that are published to subscribers when a frame buffer gets released.
ResizeEventArgs Event arguments that are published to subscribers when a frame buffer gets resized.

Type Aliases

NameDescription
_Esft_type
allocation_callback_type A function that gets invoked as a callback, if the frame buffer needs to allocate an image.

Member Functions

NameDescription
addImage addImage overloads
addImages Adds multiple images for a set of render targets to the frame buffer.
getHeight [virtual]Returns the current height of the frame buffer.
getWidth [virtual]Returns the current width of the frame buffer.
image image overloads
images Returns all images contained by the frame buffer.
mapRenderTarget mapRenderTarget overloads
mapRenderTargets Maps a set of render targets to the frame buffer images, using the names of the render targets to look up the images.
name [virtual]Returns the name of the resource.
operator[] Subscript operators
resize [virtual]Causes the frame buffer to be invalidated and recreated with a new size.
resolveImage [virtual]Resolves a render target name hash and returns the image mapped to it.
shared_from_this Returns a shared pointer to the current object instance.
size [virtual]Returns the current size of the frame buffer.
unmapRenderTarget [virtual]Removes a mapping between a render target and an image in the frame buffer.
weak_from_this Returns a weak pointer to the current object instance.

Data Members

NameDescription
released Invoked when the frame buffer gets released.
resized Invoked after the frame buffer has been resized.
resizing Invoked if the frame buffer gets resized.

Protected Types

NameDescription
Allocator An allocator used to allocate the shared object.

Protected Member Functions

NameDescription
operator= Assignment operators
name Returns the name of the resource.

Protected Static Member Functions

NameDescription
create Generic factory method used to create instances of the shared object.

Derived Classes

NameDescription
DirectX12FrameBuffer Implements a DirectX 12 frame buffer.
VulkanFrameBuffer Implements a Vulkan frame buffer.

Template Parameters

NameDescription
TImageThe type of the frame buffer images. Must be derived from IImage.

See Also

RenderTarget