RavEngine
Loading...
Searching...
No Matches
RenderPass.hpp
1#pragma once
2#include <RGL/Types.hpp>
3#include "TextureFormat.hpp"
4#include <vector>
5#include <array>
6#include <optional>
7
8namespace RGL{
9struct TextureView;
10
13 // formats, multisample count, load and store ops (see VkAttachmentDescription), and layout (from VkAttachmentReference)
14 TextureFormat format;
15 MSASampleCount sampleCount = MSASampleCount::C1;
16 LoadAccessOperation loadOp = LoadAccessOperation::DontCare;
17 StoreAccessOperation storeOp = StoreAccessOperation::DontCare;
18
19 LoadAccessOperation stencilLoadOp = LoadAccessOperation::DontCare;
20 StoreAccessOperation stencilStoreOp = StoreAccessOperation::DontCare;
21
22 std::array<float, 4> clearColor{ 0,0,0,0};
23 };
24 std::vector<AttachmentDesc> attachments;
25
26 std::optional<AttachmentDesc> depthAttachment, stencilAttachment;
27};
28
30
31 virtual void SetAttachmentTexture(uint32_t index, const TextureView& texture) = 0;
32 virtual void SetDepthAttachmentTexture(const TextureView& texture) = 0;
33 virtual void SetStencilAttachmentTexture(const TextureView& texture) = 0;
34};
35
36RGLRenderPassPtr CreateRenderPass(const RenderPassConfig& config);
37
38}
Definition RenderPass.hpp:29
Definition RenderPass.hpp:12
Definition RenderPass.hpp:11
Definition Texture.hpp:43