lsfg-vk/framegen/include/vk/core/sampler.hpp
PancakeTAS 7137310e53
refactor: remove default constructors
not sure if this is a good idea, but seeing how I've messed up vector allocations in the past, this might prevent bugs from happening
2025-09-10 17:53:42 +02:00

37 lines
930 B
C++

#pragma once
#include "vk/core/device.hpp"
#include <vulkan/vulkan_core.h>
#include <memory>
namespace VK::Core {
///
/// C++ wrapper class for a Vulkan sampler.
///
/// This class manages the lifetime of a Vulkan sampler.
///
class Sampler {
public:
///
/// Create the sampler.
///
/// @param device Vulkan device
/// @param mode Address mode for the sampler.
/// @param compare Compare operation for the sampler.
/// @param isWhite Whether the border color is white.
///
/// @throws VK::vulkan_error if object creation fails.
///
Sampler(const Device& device,
VkSamplerAddressMode mode, VkCompareOp compare, bool isWhite);
/// Get the Vulkan handle.
[[nodiscard]] auto handle() const { return *this->sampler; }
private:
std::shared_ptr<VkSampler> sampler;
};
}