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
8
namespace
RGL{
9
struct
TextureView;
10
11
struct
RenderPassConfig
{
12
struct
AttachmentDesc
{
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
29
struct
IRenderPass
{
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
36
RGLRenderPassPtr CreateRenderPass(
const
RenderPassConfig
& config);
37
38
}
RGL::IRenderPass
Definition
RenderPass.hpp:29
RGL::RenderPassConfig::AttachmentDesc
Definition
RenderPass.hpp:12
RGL::RenderPassConfig
Definition
RenderPass.hpp:11
RGL::TextureView
Definition
Texture.hpp:43
RavEngine
deps
RGL
include
RGL
RenderPass.hpp
Generated by
1.9.8