LiteFX 0.3.1.2022
Computer Graphics Engine
LiteFX::Rendering::Backends::DirectX12Sampler Class Reference

Implements a DirectX 12 ISampler. More...

#include <image.h>

Inherits LiteFX::Rendering::Backends::IDirectX12Sampler, and LiteFX::Rendering::StateResource.

Classes

class  DirectX12SamplerImpl
 

Public Member Functions

 DirectX12Sampler (const DirectX12Device &device, const FilterMode &magFilter=FilterMode::Nearest, const FilterMode &minFilter=FilterMode::Nearest, const BorderMode &borderU=BorderMode::Repeat, const BorderMode &borderV=BorderMode::Repeat, const BorderMode &borderW=BorderMode::Repeat, const MipMapMode &mipMapMode=MipMapMode::Nearest, const Float &mipMapBias=0.f, const Float &minLod=0.f, const Float &maxLod=std::numeric_limits< Float >::max(), const Float &anisotropy=0.f, const String &name="")
 Initializes a new sampler instance. More...
 
 DirectX12Sampler (DirectX12Sampler &&)=delete
 
 DirectX12Sampler (const DirectX12Sampler &)=delete
 
virtual ~DirectX12Sampler () noexcept
 
virtual const FilterMode & getMinifyingFilter () const noexcept override
 Gets the filtering mode that is used for minifying lookups. More...
 
virtual const FilterMode & getMagnifyingFilter () const noexcept override
 Gets the filtering mode that is used for magnifying lookups. More...
 
virtual const BorderMode & getBorderModeU () const noexcept override
 Gets the addressing mode at the horizontal border. More...
 
virtual const BorderMode & getBorderModeV () const noexcept override
 Gets the addressing mode at the vertical border. More...
 
virtual const BorderMode & getBorderModeW () const noexcept override
 Gets the addressing mode at the depth border. More...
 
virtual const FloatgetAnisotropy () const noexcept override
 Gets the anisotropy value used when sampling this texture. More...
 
virtual const MipMapMode & getMipMapMode () const noexcept override
 Gets the mip-map selection mode. More...
 
virtual const FloatgetMipMapBias () const noexcept override
 Gets the mip-map level of detail bias. More...
 
virtual const FloatgetMaxLOD () const noexcept override
 Gets the maximum texture level of detail. More...
 
virtual const FloatgetMinLOD () const noexcept override
 Gets the minimum texture level of detail. More...
 
- Public Member Functions inherited from LiteFX::Rendering::Backends::IDirectX12Sampler
virtual ~IDirectX12Sampler () noexcept=default
 
- Public Member Functions inherited from LiteFX::Rendering::ISampler
virtual ~ISampler () noexcept=default
 
virtual const FilterMode & getMinifyingFilter () const noexcept=0
 Gets the filtering mode that is used for minifying lookups. More...
 
virtual const FilterMode & getMagnifyingFilter () const noexcept=0
 Gets the filtering mode that is used for magnifying lookups. More...
 
virtual const BorderMode & getBorderModeU () const noexcept=0
 Gets the addressing mode at the horizontal border. More...
 
virtual const BorderMode & getBorderModeV () const noexcept=0
 Gets the addressing mode at the vertical border. More...
 
virtual const BorderMode & getBorderModeW () const noexcept=0
 Gets the addressing mode at the depth border. More...
 
virtual const FloatgetAnisotropy () const noexcept=0
 Gets the anisotropy value used when sampling this texture. More...
 
virtual const MipMapMode & getMipMapMode () const noexcept=0
 Gets the mip-map selection mode. More...
 
virtual const FloatgetMipMapBias () const noexcept=0
 Gets the mip-map level of detail bias. More...
 
virtual const FloatgetMaxLOD () const noexcept=0
 Gets the maximum texture level of detail. More...
 
virtual const FloatgetMinLOD () const noexcept=0
 Gets the minimum texture level of detail. More...
 
- Public Member Functions inherited from LiteFX::Rendering::IStateResource
virtual ~IStateResource () noexcept=default
 
virtual const Stringname () const noexcept=0
 Returns the name of the resource. More...
 
- Public Member Functions inherited from LiteFX::Rendering::StateResource
 StateResource (StringView name)
 Initializes a new state resource instance. More...
 
 StateResource (StateResource &&)=delete
 
 StateResource (const StateResource &)=delete
 
virtual ~StateResource () noexcept
 
virtual const Stringname () const noexcept override
 Returns the name of the resource. More...
 

Additional Inherited Members

- Protected Member Functions inherited from LiteFX::Rendering::StateResource
 StateResource () noexcept
 
Stringname () noexcept
 

Detailed Description

Implements a DirectX 12 ISampler.

Constructor & Destructor Documentation

◆ DirectX12Sampler() [1/3]

DirectX12Sampler::DirectX12Sampler ( const DirectX12Device device,
const FilterMode &  magFilter = FilterMode::Nearest,
const FilterMode &  minFilter = FilterMode::Nearest,
const BorderMode &  borderU = BorderMode::Repeat,
const BorderMode &  borderV = BorderMode::Repeat,
const BorderMode &  borderW = BorderMode::Repeat,
const MipMapMode &  mipMapMode = MipMapMode::Nearest,
const Float mipMapBias = 0.f,
const Float minLod = 0.f,
const Float maxLod = std::numeric_limits<Float>::max(),
const Float anisotropy = 0.f,
const String name = "" 
)
explicit

Initializes a new sampler instance.

Parameters
device
magFilter
minFilter
borderU
borderV
borderW
mipMapMode
mipMapBias
maxLod
minLod
anisotropy

◆ DirectX12Sampler() [2/3]

LiteFX::Rendering::Backends::DirectX12Sampler::DirectX12Sampler ( DirectX12Sampler &&  )
delete

◆ DirectX12Sampler() [3/3]

LiteFX::Rendering::Backends::DirectX12Sampler::DirectX12Sampler ( const DirectX12Sampler )
delete

◆ ~DirectX12Sampler()

DirectX12Sampler::~DirectX12Sampler ( )
virtualdefaultnoexcept

Member Function Documentation

◆ getAnisotropy()

const Float & DirectX12Sampler::getAnisotropy ( ) const
overridevirtualnoexcept

Gets the anisotropy value used when sampling this texture.

Implements LiteFX::Rendering::ISampler.

◆ getBorderModeU()

const BorderMode & DirectX12Sampler::getBorderModeU ( ) const
overridevirtualnoexcept

Gets the addressing mode at the horizontal border.

Implements LiteFX::Rendering::ISampler.

◆ getBorderModeV()

const BorderMode & DirectX12Sampler::getBorderModeV ( ) const
overridevirtualnoexcept

Gets the addressing mode at the vertical border.

Implements LiteFX::Rendering::ISampler.

◆ getBorderModeW()

const BorderMode & DirectX12Sampler::getBorderModeW ( ) const
overridevirtualnoexcept

Gets the addressing mode at the depth border.

Implements LiteFX::Rendering::ISampler.

◆ getMagnifyingFilter()

const FilterMode & DirectX12Sampler::getMagnifyingFilter ( ) const
overridevirtualnoexcept

Gets the filtering mode that is used for magnifying lookups.

Implements LiteFX::Rendering::ISampler.

◆ getMaxLOD()

const Float & DirectX12Sampler::getMaxLOD ( ) const
overridevirtualnoexcept

Gets the maximum texture level of detail.

Implements LiteFX::Rendering::ISampler.

◆ getMinifyingFilter()

const FilterMode & DirectX12Sampler::getMinifyingFilter ( ) const
overridevirtualnoexcept

Gets the filtering mode that is used for minifying lookups.

Implements LiteFX::Rendering::ISampler.

◆ getMinLOD()

const Float & DirectX12Sampler::getMinLOD ( ) const
overridevirtualnoexcept

Gets the minimum texture level of detail.

Implements LiteFX::Rendering::ISampler.

◆ getMipMapBias()

const Float & DirectX12Sampler::getMipMapBias ( ) const
overridevirtualnoexcept

Gets the mip-map level of detail bias.

Implements LiteFX::Rendering::ISampler.

◆ getMipMapMode()

const MipMapMode & DirectX12Sampler::getMipMapMode ( ) const
overridevirtualnoexcept

Gets the mip-map selection mode.

Implements LiteFX::Rendering::ISampler.