Castor3D 0.16.0
Multiplatform 3D engine
Public Member Functions | List of all members
castor3d::Sampler Class Reference

#include <Sampler.hpp>

Inheritance diagram for castor3d::Sampler:
Inheritance graph
[legend]
Collaboration diagram for castor3d::Sampler:
Collaboration graph
[legend]

Public Member Functions

C3D_API Sampler (castor::String const &name, Engine &engine)
 Constructor.
 
C3D_API Sampler (castor::String const &name, Engine &engine, ashes::SamplerCreateInfo const &createInfo)
 Constructor.
 
C3D_API bool initialise (RenderDevice const &device)
 Initialises the GPU sampler.
 
C3D_API void cleanup ()
 Cleanups the sampler.
 
VkSamplerAddressMode getWrapS () const
 
VkSamplerAddressMode getWrapT () const
 
VkSamplerAddressMode getWrapR () const
 
VkFilter getMinFilter () const
 
VkFilter getMagFilter () const
 
VkSamplerMipmapMode getMipFilter () const
 
float getMinLod () const
 
float getMaxLod () const
 
float getLodBias () const
 
VkBorderColor getBorderColour () const
 
float getMaxAnisotropy () const
 
VkCompareOp getCompareOp () const
 
ashes::Sampler const & getSampler () const
 
bool isAnisotropicFilteringEnabled () const
 
bool isMipmapSet () const
 
bool isCompareEnabled () const
 
void setWrapS (VkSamplerAddressMode value)
 
void setWrapT (VkSamplerAddressMode value)
 
void setWrapR (VkSamplerAddressMode value)
 
void setMinFilter (VkFilter value)
 
void setMagFilter (VkFilter value)
 
void setMipFilter (VkSamplerMipmapMode value)
 
void setMinLod (float value)
 
void setMaxLod (float value)
 
void setLodBias (float value)
 
void setBorderColour (VkBorderColor value)
 
void enableAnisotropicFiltering (bool value)
 
void setMaxAnisotropy (float value)
 
void setCompareOp (VkCompareOp value)
 
void enableCompare (bool value)
 
- Public Member Functions inherited from castor::NamedBaseT< T >
 NamedBaseT (T name) noexcept
 Constructor.
 
T const & getName () const noexcept
 Retrieves the name.
 
void rename (T name) noexcept
 
- Public Member Functions inherited from castor::OwnedBy< Engine >
Engine * getOwner () const
 

Additional Inherited Members

- Protected Member Functions inherited from castor::OwnedBy< Engine >
 OwnedBy (Engine &owner)
 Constructor.
 
- Protected Attributes inherited from castor::NamedBaseT< T >
m_name
 

Constructor & Destructor Documentation

◆ Sampler() [1/2]

C3D_API castor3d::Sampler::Sampler ( castor::String const & name,
Engine & engine )

Constructor.

Parameters
[in]engineThe engine
[in]nameThe sampler name

◆ Sampler() [2/2]

C3D_API castor3d::Sampler::Sampler ( castor::String const & name,
Engine & engine,
ashes::SamplerCreateInfo const & createInfo )

Constructor.

Parameters
[in]engineThe engine.
[in]nameThe sampler name.
[in]createInfoThe creation infos.

Member Function Documentation

◆ cleanup()

C3D_API void castor3d::Sampler::cleanup ( )

Cleanups the sampler.

◆ enableAnisotropicFiltering()

void castor3d::Sampler::enableAnisotropicFiltering ( bool value)
inline

◆ enableCompare()

void castor3d::Sampler::enableCompare ( bool value)
inline

◆ getBorderColour()

VkBorderColor castor3d::Sampler::getBorderColour ( ) const
inline

◆ getCompareOp()

VkCompareOp castor3d::Sampler::getCompareOp ( ) const
inline

◆ getLodBias()

float castor3d::Sampler::getLodBias ( ) const
inline

◆ getMagFilter()

VkFilter castor3d::Sampler::getMagFilter ( ) const
inline

◆ getMaxAnisotropy()

float castor3d::Sampler::getMaxAnisotropy ( ) const
inline

◆ getMaxLod()

float castor3d::Sampler::getMaxLod ( ) const
inline

◆ getMinFilter()

VkFilter castor3d::Sampler::getMinFilter ( ) const
inline

◆ getMinLod()

float castor3d::Sampler::getMinLod ( ) const
inline

◆ getMipFilter()

VkSamplerMipmapMode castor3d::Sampler::getMipFilter ( ) const
inline

◆ getSampler()

ashes::Sampler const & castor3d::Sampler::getSampler ( ) const
inline

References CU_Require.

Referenced by castor3d::IblTextures::getPrefilteredBrdfSampler(), and castor3d::EnvironmentPrefilter::getSampler().

Here is the caller graph for this function:

◆ getWrapR()

VkSamplerAddressMode castor3d::Sampler::getWrapR ( ) const
inline

◆ getWrapS()

VkSamplerAddressMode castor3d::Sampler::getWrapS ( ) const
inline

name Getters.

◆ getWrapT()

VkSamplerAddressMode castor3d::Sampler::getWrapT ( ) const
inline

◆ initialise()

C3D_API bool castor3d::Sampler::initialise ( RenderDevice const & device)

Initialises the GPU sampler.

Parameters
[in]deviceThe GPU device.
Returns
true if ok.

◆ isAnisotropicFilteringEnabled()

bool castor3d::Sampler::isAnisotropicFilteringEnabled ( ) const
inline

◆ isCompareEnabled()

bool castor3d::Sampler::isCompareEnabled ( ) const
inline

◆ isMipmapSet()

bool castor3d::Sampler::isMipmapSet ( ) const
inline

◆ setBorderColour()

void castor3d::Sampler::setBorderColour ( VkBorderColor value)
inline

◆ setCompareOp()

void castor3d::Sampler::setCompareOp ( VkCompareOp value)
inline

◆ setLodBias()

void castor3d::Sampler::setLodBias ( float value)
inline

◆ setMagFilter()

void castor3d::Sampler::setMagFilter ( VkFilter value)
inline

◆ setMaxAnisotropy()

void castor3d::Sampler::setMaxAnisotropy ( float value)
inline

◆ setMaxLod()

void castor3d::Sampler::setMaxLod ( float value)
inline

◆ setMinFilter()

void castor3d::Sampler::setMinFilter ( VkFilter value)
inline

◆ setMinLod()

void castor3d::Sampler::setMinLod ( float value)
inline

◆ setMipFilter()

void castor3d::Sampler::setMipFilter ( VkSamplerMipmapMode value)
inline

◆ setWrapR()

void castor3d::Sampler::setWrapR ( VkSamplerAddressMode value)
inline

◆ setWrapS()

void castor3d::Sampler::setWrapS ( VkSamplerAddressMode value)
inline

name Setters

Remarks
They have an effect until initialise() is called.

◆ setWrapT()

void castor3d::Sampler::setWrapT ( VkSamplerAddressMode value)
inline

The documentation for this class was generated from the following file: