10class RenderPassAllocator;
42 struct RenderTargetInfo {
47 struct RenderTargetInfoCompare {
48 bool operator()(
const RenderTargetInfo& a,
const RenderTargetInfo& b)
const {
49 if (a.size.x != b.size.x) {
50 return a.size.x < b.size.x;
53 if (a.size.y != b.size.y) {
54 return a.size.y < b.size.y;
57 return a.format < b.format;
66 std::map<RenderTargetInfo, std::deque<RenderTarget>, RenderTargetInfoCompare> freeRenderTargets;
71 virtual void FreeRenderPasses(
Texture* renderTarget);
Responsible for allocating render passes and framebuffers.
Definition: RenderPassAllocator.hpp:11
Responsible for allocating render targets.
Definition: RenderTargetAllocator.hpp:13
void FreeRenderTarget(Texture *renderTarget)
Free a render target.
Definition: RenderTargetAllocator.cpp:60
RenderTargetAllocator(uint8_t frames, RenderPassAllocator *renderPassAllocator)
Create a new render target allocator.
Definition: RenderTargetAllocator.cpp:10
Texture * CreateRenderTarget(const glm::uvec2 &size, Texture::Format format)
Create a render target.
Definition: RenderTargetAllocator.cpp:40
virtual ~RenderTargetAllocator()
Destructor.
Definition: RenderTargetAllocator.cpp:15
virtual void BeginFrame()
Call at the beginning of each frame.
Definition: RenderTargetAllocator.cpp:24
A texture.
Definition: Texture.hpp:8
Format
The format of the texture.
Definition: Texture.hpp:18
Definition: Editor.hpp:18