vengine  0.0.1
3D graphics engine
Loading...
Searching...
No Matches
Writer.hpp
Go to the documentation of this file.
1///
2/// @file Writer.hpp
3/// @brief This file contains the DescriptorsWriter class
4/// @namespace ven
5///
6
7#pragma once
8
11
12namespace ven {
13
14 ///
15 /// @class DescriptorWriter
16 /// @brief Class for descriptor writer
17 /// @namespace ven
18 ///
20
21 public:
22
23 DescriptorWriter(DescriptorSetLayout &setLayout, DescriptorPool &pool) : m_setLayout{setLayout}, m_pool{pool} {}
24 ~DescriptorWriter() = default;
25
30
31 DescriptorWriter &writeBuffer(uint32_t binding, const VkDescriptorBufferInfo *bufferInfo);
32 DescriptorWriter &writeImage(uint32_t binding, const VkDescriptorImageInfo *imageInfo);
33
34 bool build(VkDescriptorSet &set);
35 void overwrite(const VkDescriptorSet &set);
36
37 private:
38
41 std::vector<VkWriteDescriptorSet> m_writes;
42
43 }; // class DescriptorWriter
44
45} // namespace ven
This file contains the DescriptorPool class.
This file contains the DescriptorSetLayout class.
Class for descriptor pool.
Definition Pool.hpp:22
Class for descriptor set layout.
Definition SetLayout.hpp:21
Class for descriptor writer.
Definition Writer.hpp:19
DescriptorWriter & operator=(const DescriptorWriter &)=delete
DescriptorWriter & writeImage(uint32_t binding, const VkDescriptorImageInfo *imageInfo)
Definition writer.cpp:24
DescriptorPool & m_pool
Definition Writer.hpp:40
DescriptorWriter(DescriptorWriter &&)=delete
std::vector< VkWriteDescriptorSet > m_writes
Definition Writer.hpp:41
DescriptorWriter & writeBuffer(uint32_t binding, const VkDescriptorBufferInfo *bufferInfo)
Definition writer.cpp:5
DescriptorSetLayout & m_setLayout
Definition Writer.hpp:39
DescriptorWriter(DescriptorSetLayout &setLayout, DescriptorPool &pool)
Definition Writer.hpp:23
void overwrite(const VkDescriptorSet &set)
Definition writer.cpp:52
bool build(VkDescriptorSet &set)
Definition writer.cpp:43
~DescriptorWriter()=default
DescriptorWriter & operator=(DescriptorWriter &&)=delete
DescriptorWriter(const DescriptorWriter &)=delete