3#include <vulkan/vulkan.hpp>
64 bool initialize(
const std::shared_ptr<Core::VulkanBackend>& backend);
90 vk::Sampler get_default_linear();
96 vk::Sampler get_default_nearest();
103 vk::Sampler get_anisotropic(
float max_anisotropy = 16.0F);
111 void destroy_sampler(vk::Sampler sampler);
133 [[nodiscard]]
static FitPlan plan_fit(
bool is_initialized() const
Check if factory is initialized.
std::unordered_map< size_t, vk::Sampler > m_sampler_cache
SamplerForge & operator=(const SamplerForge &)=delete
static bool s_initialized
SamplerForge(SamplerForge &&)=delete
SamplerForge(const SamplerForge &)=delete
static SamplerForge & instance()
size_t get_sampler_count() const
Get number of cached samplers.
SamplerForge & operator=(SamplerForge &&)=delete
std::shared_ptr< Core::VulkanBackend > m_backend
Creates and caches Vulkan samplers (Singleton)
AddressMode
Texture addressing mode (wrapping)
SamplerForge & get_sampler_factory()
Convenience wrapper around SamplerForge::instance()
FilterMode
Texture filtering mode.
BorderColor
Color read outside the texture when an address mode is CLAMP_TO_BORDER.
FitMode
How a source extent is mapped onto a destination extent.
std::shared_ptr< Kriya::SamplingPipeline > create_sampler(const std::string &filepath, uint32_t num_samples, bool truncate, uint32_t channel, uint64_t max_dur_ms)
Construct a built SamplingPipeline from an audio file.
std::vector< LayerBlit > blits
One fit expressed for both ways of applying it.