3#include <vulkan/vulkan.hpp>
48 bool initialize(
const std::shared_ptr<Core::VulkanBackend>& backend);
74 vk::Sampler get_default_linear();
80 vk::Sampler get_default_nearest();
87 vk::Sampler get_anisotropic(
float max_anisotropy = 16.0F);
95 void destroy_sampler(vk::Sampler sampler);
118 static vk::Filter to_vk_filter(
FilterMode mode);
121 static vk::SamplerAddressMode to_vk_address_mode(
AddressMode mode);
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)
void shutdown()
Shutdown Portal::Graphics subsystem.
AddressMode
Texture addressing mode (wrapping)
SamplerForge & get_sampler_factory()
Convenience wrapper around SamplerForge::instance()
FilterMode
Texture filtering mode.