3#include "../Interface/RenderTargetAllocator.hpp"
42 struct AttachmentlessRenderTargetInfo {
47 struct AttachmentlessRenderTargetInfoCompare {
48 bool operator()(
const AttachmentlessRenderTargetInfo& a,
const AttachmentlessRenderTargetInfo& 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.sampleCount < b.sampleCount;
61 struct AttachmentlessRenderTarget {
69 void FreeRenderPasses(
Texture* renderTarget)
final;
73 std::map<AttachmentlessRenderTargetInfo, std::deque<AttachmentlessRenderTarget>, AttachmentlessRenderTargetInfoCompare> freeAttachmentlessRenderTargets;
Responsible for allocating render targets.
Definition: RenderTargetAllocator.hpp:13
A texture.
Definition: Texture.hpp:8
Format
The format of the texture.
Definition: Texture.hpp:18
WebGPU implementation of RenderTargetAllocator.
Definition: WebGPURenderTargetAllocator.hpp:15
WebGPUTexture * CreateAttachmentlessRenderTarget(const glm::uvec2 &size, uint32_t sampleCount=1)
Create an attachmentless render target.
Definition: WebGPURenderTargetAllocator.cpp:34
WebGPURenderTargetAllocator(WebGPURenderer &renderer)
Create a new render target allocator.
Definition: WebGPURenderTargetAllocator.cpp:9
~WebGPURenderTargetAllocator() final
Destructor.
Definition: WebGPURenderTargetAllocator.cpp:13
void BeginFrame() final
Call at the beginning of each frame.
Definition: WebGPURenderTargetAllocator.cpp:17
void FreeAttachmentlessRenderTarget(WebGPUTexture *renderTarget)
Free an attachmentless render target.
Definition: WebGPURenderTargetAllocator.cpp:54
Low-level renderer implementing WebGPU.
Definition: WebGPURenderer.hpp:22
WebGPU implementation of Texture.
Definition: WebGPUTexture.hpp:13
Definition: Editor.hpp:18