sandbox
Loading...
Searching...
No Matches
sampler_state.hpp
1// SPDX-License-Identifier: MIT
2#ifndef LIBSBX_GRAPHICS_IMAGES_SAMPLER_STATE_HPP_
3#define LIBSBX_GRAPHICS_IMAGES_SAMPLER_STATE_HPP_
4
5#include <libsbx/graphics/descriptor/descriptor.hpp>
6#include <libsbx/graphics/resource_storage.hpp>
7#include <libsbx/graphics/images/image2d.hpp>
8
9namespace sbx::graphics {
10
11class sampler_state : public descriptor {
12
13public:
14
15 sampler_state(graphics::filter mag_filter, graphics::filter min_filter, graphics::address_mode address_mode_u, graphics::address_mode address_mode_v, std::float_t anisotropy = 1.0f);
16
17 sampler_state(graphics::filter filter = graphics::filter::linear, graphics::address_mode address_mode = graphics::address_mode::clamp_to_edge);
18
20
21 static auto create_descriptor_set_layout_binding(std::uint32_t binding, VkDescriptorType descriptor_type, VkShaderStageFlags shader_stage_flags) noexcept -> VkDescriptorSetLayoutBinding;
22
23 auto write_descriptor_set(std::uint32_t binding, VkDescriptorType descriptor_type) const noexcept -> graphics::write_descriptor_set override;
24
25 auto handle() const noexcept -> VkSampler;
26
27 operator VkSampler() const noexcept;
28
29private:
30
31 VkSampler _handle;
32
33}; // class sampler_state
34
36
37} // namespace sbx::graphics
38
39#endif // LIBSBX_GRAPHICS_IMAGES_SAMPLER_STATE_HPP_
Definition: descriptor.hpp:38
Definition: resource_storage.hpp:18
Definition: sampler_state.hpp:11
Definition: descriptor.hpp:13