RavEngine
Loading...
Searching...
No Matches
WGRenderPass.hpp
1#pragma once
2#include <RGL/RenderPass.hpp>
3#include <array>
4#include <emscripten/html5_webgpu.h>
5
6namespace RGL{
7 struct TextureView;
8
9 struct RenderPassWG : public IRenderPass{
10
11 WGPURenderPassDescriptorMaxDrawCount maxDrawCount{
12 .chain = {
13 .next = nullptr,
14 .sType = WGPUSType_RenderPassDescriptorMaxDrawCount
15 },
16 .maxDrawCount = 65535
17 };
18 WGPURenderPassDescriptor renderPass;
19 std::vector<WGPURenderPassColorAttachment> colorAttachments;
20 WGPURenderPassDepthStencilAttachment depthStencilAttachment;
21
22 // IRenderPass
23 RenderPassWG(const RenderPassConfig& config);
24 virtual ~RenderPassWG(){}
25 void SetAttachmentTexture(uint32_t index, const TextureView& texture) final;
26
27 void SetDepthAttachmentTexture(const TextureView& texture) final;
28 void SetStencilAttachmentTexture(const TextureView& texture) final;
29 };
30}
Definition RenderPass.hpp:29
Definition RenderPass.hpp:11
Definition WGRenderPass.hpp:9
Definition Texture.hpp:43