Sampler create info structure. More...
#include <kanzi/core.ui/graphics2d/sampler.hpp>
Public Member Functions | |
| constexpr | CreateInfo (MipmapMode mipmapMode, Filter minificationFilter, Filter magnificationFilter, AddressingMode addressingMode, GraphicsCompareFunction depthCompareFunction, float anisotropy, float mipLodBias, float minLod, float maxLod) |
| Constructor. | |
| constexpr AddressingMode | getAddressingMode () const |
| Gets the addressing mode. | |
| constexpr float | getAnisotropyLevel () const |
| Gets the anisotropy level. | |
| constexpr GraphicsCompareFunction | getDepthCompareFunction () const |
| Gets the depth compare function. | |
| constexpr Filter | getMagnificationFilter () const |
| Gets the magnification filter. | |
| constexpr float | getMaxLod () const |
| Gets maximum texture level of detail. | |
| constexpr Filter | getMinificationFilter () const |
| Gets the minification filter. | |
| constexpr float | getMinLod () const |
| Gets minimum texture level of detail. | |
| constexpr float | getMipLodBias () const |
| Gets the mipmap LoD bias. | |
| constexpr MipmapMode | getMipmapMode () const |
| Gets the mipmamp mode. | |
| bool | operator< (const CreateInfo &other) const |
| Less than -operator. | |
| constexpr void | setAddressingMode (AddressingMode addressingMode) |
| Sets the addressing mode. | |
| constexpr void | setAnisotropyLevel (float anisotropy) |
| Sets the anisotropy level. | |
| constexpr void | setDepthCompareFunction (GraphicsCompareFunction depthCompareFunction) |
| Sets the depth compare function. | |
| constexpr void | setMagnificationFilter (Filter magnificationFilter) |
| Sets the magnification filter. | |
| constexpr void | setMaxLod (float maxLod) |
| Sets maximum texture level of detail. | |
| constexpr void | setMinificationFilter (Filter minificationFilter) |
| Sets the minfication filter. | |
| constexpr void | setMinLod (float minLod) |
| Sets minimum texture level of detail. | |
| constexpr void | setMipLodBias (float mipLodBias) |
| Sets the mipmap LoD bias. | |
| constexpr void | setMipmapMode (MipmapMode mipmapMode) |
| Sets the mipmap mode. | |
Protected Member Functions | |
| template<typename T > | |
| constexpr T | getBits (uint32_t mask, uint32_t shift) const |
| Gets bits from the first element of the data array. | |
| template<typename T > | |
| constexpr void | setBits (T value, uint32_t mask, uint32_t shift) |
| Sets bits in the first element of the data array. | |
Protected Attributes | ||
| union { | ||
| array< uint64_t, 2 > arrayData | ||
| Flat array data for fast comparison. More... | ||
| struct { | ||
| uint32_t bitmask | ||
| Bitmask for packed integer values. More... | ||
| float floatValues [3] | ||
| Remaining float values. More... | ||
| } structData | ||
| Separated struct. More... | ||
| } | m_data | |
| Internal key data that received the packed data. | ||
Sampler create info structure.
The full sampler settings are packed into a key that can be used to easily compare it as opposed to comparing every field separately.
|
inlineexplicitconstexpr |
Constructor.
| mipmapMode | Mipmap mode. |
| minificationFilter | Minification filter. |
| magnificationFilter | Magnification filter. |
| addressingMode | Addressing mode. |
| depthCompareFunction | Depth compare function. |
| anisotropy | Anisotropy level. |
| mipLodBias | Mipmapping LOD bias. |
| minLod | Minimum LOD level. |
| maxLod | Maximum LOD level. |
|
inlineconstexprprotected |
Gets bits from the first element of the data array.
| mask | Mask for all possible values. |
| shift | Shift index from beginning of data. |
|
inlineconstexprprotected |
Sets bits in the first element of the data array.
| value | Value to set. |
| mask | Mask for all possible values. |
| shift | Shift index from beginning of data. |
|
inlineconstexpr |
Gets the mipmamp mode.
|
inlineconstexpr |
Sets the mipmap mode.
| mipmapMode | Mimap mode. |
Gets the minification filter.
|
inlineconstexpr |
Sets the minfication filter.
| minificationFilter | Minification filter. |
Gets the magnification filter.
|
inlineconstexpr |
Sets the magnification filter.
| magnificationFilter | Magnification filter. |
|
inlineconstexpr |
Gets the addressing mode.
|
inlineconstexpr |
Sets the addressing mode.
| addressingMode | Addressing mode. |
|
inlineconstexpr |
Gets the depth compare function.
|
inlineconstexpr |
Sets the depth compare function.
| depthCompareFunction | Depth compare function. |
Gets the anisotropy level.
Sets the anisotropy level.
| anisotropy | Anisotropy level. |
Gets the mipmap LoD bias.
Sets the mipmap LoD bias.
Default CreateInfo constructor initializes this to 0.
| mipLodBias | Mipmap LoD bias. |
Gets minimum texture level of detail.
Sets minimum texture level of detail.
Default CreateInfo constructor initializes this to -1000 (effectively no clamping for level of detail).
| minLod | Minimum texture level of detail. |
Gets maximum texture level of detail.
Sets maximum texture level of detail.
Default CreateInfo constructor initializes this to 1000 (effectively no clamping for level of detail).
| maxLod | Maximum texture level of detail. |
|
inline |
Less than -operator.
| other | Right-hand-side operand. |
| array<uint64_t, 2> kanzi::Sampler::CreateInfo::arrayData |
Flat array data for fast comparison.
| uint32_t kanzi::Sampler::CreateInfo::bitmask |
Bitmask for packed integer values.
| float kanzi::Sampler::CreateInfo::floatValues[3] |
Remaining float values.
| struct { ... } kanzi::Sampler::CreateInfo::structData |
Separated struct.
| union { ... } kanzi::Sampler::CreateInfo::m_data |
Internal key data that received the packed data.
First element bits 0 to 1: Mipmap mode. First element bit 2: Minification filter. First element bit 3: Magnification filter. First element bits 4-6: Addressing mode. First element bits 7-10: Depth compare function. First element bits 11-16: Anisotropy level. First element bits 32-63: Mipmap LoD bias. Second element bits 0-31: Minimum LoD. Second element bits 31-63: Maximum LoD.