Sampler provides the sampling parameters used to sampling textures. More...
#include <kanzi/core.ui/graphics2d/sampler.hpp>
Classes | |
| struct | CreateInfo |
| Sampler create info structure. More... | |
Public Types | |
| enum | AddressingMode { AddressingModeWrap , AddressingModeMirror , AddressingModeClamp , AddressingModeMirrorOnce , AddressingModeClampBorder } |
| Addressing mode. More... | |
| enum | Filter { FilterNearest , FilterLinear } |
| Filter mode. More... | |
| enum | MipmapMode { MipmapModeBase , MipmapModeNearest , MipmapModeLinear } |
| Mipmap mode. More... | |
Public Member Functions | |
| constexpr AddressingMode | getAddressingMode () const |
| Gets the sampler addressing mode. | |
| constexpr float | getAnisotropy () const |
| Gets the sampler anisotropy. | |
| CreateInfo | getCreateInfo () const |
| Gets the create info that was used to create this sampler. | |
| constexpr GraphicsCompareFunction | getDepthCompareFunction () const |
| Gets the depth compare function. | |
| gfx::SamplerHandleGuard | getHandle () const |
| Gets the Kanzi graphics handle. | |
| constexpr Filter | getMagnificationFilter () const |
| Gets the sampler magnification filter. | |
| constexpr float | getMaxLod () const |
| Gets the maximum mipmap LoD level. | |
| constexpr Filter | getMinificationFilter () const |
| Gets the sampler minification filter. | |
| constexpr float | getMinLod () const |
| Gets the minimum mipmap LoD level. | |
| constexpr float | getMipLodBias () const |
| Gets the mipmap LoD bias. | |
| constexpr MipmapMode | getMipmapMode () const |
| Gets the sampler mipmap mode. | |
| const string & | getName () const |
| Gets the name of the sampler. | |
| void | initializeSamplerHandle (Renderer &renderer) |
| Creates the sampler handle. | |
| void | invalidate () |
| Invalidates the sampler. | |
| Sampler & | operator= (const Sampler &) KZ_DELETED_FUNCTION |
| Deleted copy operator. | |
| void | previewPatch (Renderer &renderer, const CreateInfo &createInfo) |
| Patch the sampler from given create info structure. | |
| Sampler (const Sampler &) KZ_DELETED_FUNCTION | |
| Deleted copy constructor. | |
| Sampler (Renderer &renderer, const CreateInfo &createInfo, string_view name) | |
| Construct from create information. | |
Protected Attributes | |
| CreateInfo | m_createInfo |
| Create info containing all sampler settings. | |
| gfx::SamplerHandleGuard | m_handle |
| Sampler handle. | |
| string | m_name |
| Sampler name. | |
Friends | |
| void | swap (Sampler &left, Sampler &right) |
| Swap implementation. | |
| class | Texture |
Sampler provides the sampling parameters used to sampling textures.
This includes for example minification and magnification filters, mipmap mode, and texture addressing mode for textures.
Mipmap mode.
|
explicit |
|
inline |
Gets the create info that was used to create this sampler.
|
inline |
Gets the name of the sampler.
|
inlineconstexpr |
Gets the sampler mipmap mode.
Gets the sampler minification filter.
Gets the sampler magnification filter.
|
inlineconstexpr |
Gets the sampler addressing mode.
|
inlineconstexpr |
Gets the depth compare function.
Gets the sampler anisotropy.
Gets the mipmap LoD bias.
Gets the minimum mipmap LoD level.
Gets the maximum mipmap LoD level.
|
inline |
Gets the Kanzi graphics handle.
| void kanzi::Sampler::invalidate | ( | ) |
Invalidates the sampler.
| void kanzi::Sampler::previewPatch | ( | Renderer & | renderer, |
| const CreateInfo & | createInfo ) |
Patch the sampler from given create info structure.
| renderer | Renderer to use for creating the handle. |
| createInfo | Create info containing sampler settings. |
renderer parameter. Creates the sampler handle.
| renderer | Renderer to use for creating the sampler. |
Swap implementation.
| left | Left-hand-side operand. |
| right | Right-hand-side operand. |
|
protected |
Create info containing all sampler settings.
|
protected |
Sampler name.
|
protected |
Sampler handle.