sandbox
Loading...
Searching...
No Matches
descriptor_set.hpp
1// SPDX-License-Identifier: MIT
2#ifndef LIBSBX_GRAPHICS_DESCRIPTOR_DESCRIPTOR_SET_HPP_
3#define LIBSBX_GRAPHICS_DESCRIPTOR_DESCRIPTOR_SET_HPP_
4
5#include <vulkan/vulkan.hpp>
6
7#include <libsbx/graphics/commands/command_buffer.hpp>
8
9#include <libsbx/graphics/pipeline/pipeline.hpp>
10
11namespace sbx::graphics {
12
14
15public:
16
17 explicit descriptor_set(const pipeline& pipeline, std::uint32_t set) noexcept;
18
20
21 static auto update(const std::vector<VkWriteDescriptorSet>& write_descriptor_sets) -> void;
22
23 auto handle() const noexcept -> VkDescriptorSet;
24
25 operator VkDescriptorSet() const noexcept;
26
27 auto bind(command_buffer& command_buffer) const noexcept -> void;
28
29private:
30
31 std::uint32_t _set;
32 VkPipelineLayout _pipeline_layout;
33 VkPipelineBindPoint _pipeline_bind_point;
34 VkDescriptorPool _descriptor_pool;
35 VkDescriptorSet _descriptor_set;
36
37}; // class descriptor_set
38
39} // namespace sbx::graphics
40
41#endif // LIBSBX_GRAPHICS_DESCRIPTOR_DESCRIPTOR_SET_HPP_
Definition: command_buffer.hpp:15
Definition: descriptor_set.hpp:13
Definition: pipeline.hpp:21