Hymn to Beauty
C++ 3D Engine
Video::RenderTargetAllocator Class Referenceabstract

Responsible for allocating render targets. More...

#include <RenderTargetAllocator.hpp>

Inheritance diagram for Video::RenderTargetAllocator:
Video::OpenGLRenderTargetAllocator Video::VulkanRenderTargetAllocator Video::WebGPURenderTargetAllocator

Public Member Functions

 RenderTargetAllocator (uint8_t frames, RenderPassAllocator *renderPassAllocator)
 Create a new render target allocator. More...
 
virtual ~RenderTargetAllocator ()
 Destructor. More...
 
virtual void BeginFrame ()
 Call at the beginning of each frame. More...
 
TextureCreateRenderTarget (const glm::uvec2 &size, Texture::Format format)
 Create a render target. More...
 
void FreeRenderTarget (Texture *renderTarget)
 Free a render target. More...
 

Detailed Description

Responsible for allocating render targets.

Constructor & Destructor Documentation

◆ RenderTargetAllocator()

Video::RenderTargetAllocator::RenderTargetAllocator ( uint8_t  frames,
RenderPassAllocator renderPassAllocator 
)

Create a new render target allocator.

Parameters
framesHow many frames to keep unused render targets alive.
renderPassAllocatorRender pass allocator. A nullptr can be passed if the FreeRenderPasses method has been overriden to not use it.

◆ ~RenderTargetAllocator()

Video::RenderTargetAllocator::~RenderTargetAllocator ( )
virtual

Destructor.

Member Function Documentation

◆ BeginFrame()

void Video::RenderTargetAllocator::BeginFrame ( )
virtual

Call at the beginning of each frame.

Reimplemented in Video::WebGPURenderTargetAllocator.

◆ CreateRenderTarget()

Texture * Video::RenderTargetAllocator::CreateRenderTarget ( const glm::uvec2 &  size,
Texture::Format  format 
)

Create a render target.

Parameters
sizeThe size of the texture, in pixels.
formatThe format of the texture.

◆ FreeRenderTarget()

void Video::RenderTargetAllocator::FreeRenderTarget ( Texture renderTarget)

Free a render target.

Parameters
renderTargetThe render target to free.

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