Class Sampler#
Defined in File Sampler.h
Inheritance Relationships#
Derived Type#
public TRAP::Graphics::API::VulkanSampler
(Class VulkanSampler)
Class Documentation#
-
class Sampler#
Subclassed by TRAP::Graphics::API::VulkanSampler
Public Functions
-
virtual ~Sampler()#
Destructor.
-
constexpr FilterType GetMinFilter() const noexcept#
Retrieve the minification filter of the sampler.
- Returns:
Minification filter.
-
constexpr FilterType GetMagFilter() const noexcept#
Retrieve the magnification filter of the sampler.
- Returns:
Magnification filter.
-
constexpr MipMapMode GetMipMapMode() const noexcept#
Retrieve the mip map mode of the sampler.
- Returns:
Mip map mode.
-
constexpr AddressMode GetAddressU() const noexcept#
Retrieve the address mode of the U coordinate of the sampler.
- Returns:
Address mode.
-
constexpr AddressMode GetAddressV() const noexcept#
Retrieve the address mode of the V coordinate of the sampler.
- Returns:
Address mode.
-
constexpr AddressMode GetAddressW() const noexcept#
Retrieve the address mode of the W coordinate of the sampler.
- Returns:
Address mode.
-
constexpr f32 GetMipLodBias() const noexcept#
Retrieve the mip lod bias of the sampler.
- Returns:
Address mode.
-
constexpr f32 GetAnisotropyLevel() const noexcept#
Retrieve the max anisotropy of the sampler.
- Returns:
Max anisotropy.
-
constexpr CompareMode GetCompareFunc() const noexcept#
Retrieve the compare function of the sampler.
- Returns:
Compare function.
-
constexpr bool UsesEngineAnisotropyLevel() const noexcept#
Retrieve whether the sampler uses the engines anisotropy level or not.
- Returns:
True if engine set anisotropy level is used, false otherwise.
Public Static Functions
-
static TRAP::Ref<Sampler> Create(RendererAPI::SamplerDesc desc)#
Create a new sampler from the given description.
- Parameters:
desc – Sampler description.
- Returns:
Created sampler.
-
static void ClearCache() noexcept#
Clear all cached samplers.
-
static void UpdateSamplers()#
Updates all samplers currently in use.
Warning
Only call this function between frames!
Protected Functions
-
explicit Sampler(const RendererAPI::SamplerDesc &desc)#
Constructor.
Protected Attributes
-
RendererAPI::SamplerDesc m_samplerDesc = {}#
-
bool m_usesEngineAnisotropyLevel = false#
-
virtual ~Sampler()#