sandbox
Loading...
Searching...
No Matches
separate_image2d_array.hpp
1// SPDX-License-Identifier: MIT
2#ifndef LIBSBX_GRAPHICS_IMAGES_SEPARATE_IMAGE2D_ARRAY_HPP_
3#define LIBSBX_GRAPHICS_IMAGES_SEPARATE_IMAGE2D_ARRAY_HPP_
4
5#include <vector>
6#include <unordered_map>
7
8#include <libsbx/graphics/resource_storage.hpp>
9
10#include <libsbx/graphics/descriptor/descriptor.hpp>
11
12#include <libsbx/graphics/images/image2d.hpp>
13
14namespace sbx::graphics {
15
17
18public:
19
20 inline static constexpr auto max_size = std::uint32_t{256u};
21
23
25
27
28 static auto create_descriptor_set_layout_binding(std::uint32_t binding, VkDescriptorType descriptor_type, VkShaderStageFlags shader_stage_flags) noexcept -> VkDescriptorSetLayoutBinding;
29
30 auto write_descriptor_set(std::uint32_t binding, VkDescriptorType descriptor_type) const noexcept -> graphics::write_descriptor_set override;
31
32 auto push_back(const handle_type& handle) -> std::uint32_t;
33
34 auto clear() -> void;
35
36private:
37
38 std::vector<handle_type> _image_ids;
39 std::unordered_map<handle_type, std::uint32_t> _id_to_indices;
40
41}; // class separate_image2d_array
42
43} // namespace sbx::graphics
44
45#endif // LIBSBX_GRAPHICS_IMAGES_SEPARATE_IMAGE2D_ARRAY_HPP_
Definition: descriptor.hpp:38
Definition: resource_storage.hpp:18
Definition: separate_image2d_array.hpp:16
Definition: descriptor.hpp:13