SPARK  0.1.0
A general purpose game engine written in C++.
Loading...
Searching...
No Matches
DescriptorBinding.h
1#pragma once
2
3#include "spark/render/Buffer.h"
4#include "spark/render/Export.h"
5#include "spark/render/Image.h"
6#include "spark/render/Sampler.h"
7
8#include <functional>
9#include <optional>
10#include <variant>
11
12namespace spark::render
13{
17 struct SPARK_RENDER_EXPORT DescriptorBinding
18 {
20 std::optional<unsigned int> binding = std::nullopt;
21
23 std::variant<std::monostate, std::reference_wrapper<IBuffer>, std::reference_wrapper<IImage>, std::reference_wrapper<ISampler>> resource;
24
27 unsigned int firstDescriptor = 0;
28
31 unsigned int firstElement = 0;
32
35 unsigned int elements = 0;
36
39 unsigned int firstLevel = 0;
40
43 unsigned int levels = 0;
44 };
45}
Describes a resource binding in a descriptor set.
Definition DescriptorBinding.h:18
std::variant< std::monostate, std::reference_wrapper< IBuffer >, std::reference_wrapper< IImage >, std::reference_wrapper< ISampler > > resource
Resource to bind or std::monostate if the binding is empty.
Definition DescriptorBinding.h:23