|
Hymn to Beauty
C++ 3D Engine
|
Responsible for allocating render targets. More...
#include <RenderTargetAllocator.hpp>
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... | |
| Texture * | CreateRenderTarget (const glm::uvec2 &size, Texture::Format format) |
| Create a render target. More... | |
| void | FreeRenderTarget (Texture *renderTarget) |
| Free a render target. More... | |
Responsible for allocating render targets.
| Video::RenderTargetAllocator::RenderTargetAllocator | ( | uint8_t | frames, |
| RenderPassAllocator * | renderPassAllocator | ||
| ) |
Create a new render target allocator.
| frames | How many frames to keep unused render targets alive. |
| renderPassAllocator | Render pass allocator. A nullptr can be passed if the FreeRenderPasses method has been overriden to not use it. |
|
virtual |
Destructor.
|
virtual |
Call at the beginning of each frame.
Reimplemented in Video::WebGPURenderTargetAllocator.
| Texture * Video::RenderTargetAllocator::CreateRenderTarget | ( | const glm::uvec2 & | size, |
| Texture::Format | format | ||
| ) |
Create a render target.
| size | The size of the texture, in pixels. |
| format | The format of the texture. |
| void Video::RenderTargetAllocator::FreeRenderTarget | ( | Texture * | renderTarget | ) |
Free a render target.
| renderTarget | The render target to free. |