Kanzi  3.9.4
Kanzi Engine API
kanzi::Sampler Class Reference

Sampler provides the sampling parameters, such as minification and magnification filters, mipmap mode, and texture addressing mode for textures. More...

#include <kanzi/core.ui/graphics2d/sampler.hpp>

Classes

struct  CreateInfo
 

Public Types

enum  AddressingMode {
  AddressingModeWrap, AddressingModeMirror, AddressingModeClamp, AddressingModeMirrorOnce,
  AddressingModeClampBorder
}
 
enum  Filter { FilterNearest, FilterLinear }
 
enum  MipmapMode { MipmapModeBase, MipmapModeNearest, MipmapModeLinear }
 

Public Member Functions

AddressingMode getAddressingMode () const
 Gets the sampler addressing mode. More...
 
float getAnisotropy () const
 Gets the sampler anisotropy. More...
 
GraphicsCompareFunction getDepthCompareFunction () const
 Gets the depth compare function. More...
 
Filter getMagnificationFilter () const
 Gets the sampler magnification filter. More...
 
float getMaxLod () const
 
Filter getMinificationFilter () const
 Gets the sampler minification filter. More...
 
float getMinLod () const
 
float getMipLodBias () const
 
MipmapMode getMipmapMode () const
 Gets the sampler mipmap mode. More...
 
 Sampler ()
 
 Sampler (const CreateInfo &createInfo)
 

Friends

void swap (Sampler &left, Sampler &right)
 
class Texture
 

Detailed Description

Sampler provides the sampling parameters, such as minification and magnification filters, mipmap mode, and texture addressing mode for textures.

Member Enumeration Documentation

◆ Filter

Enumerator
FilterNearest 
FilterLinear 

◆ AddressingMode

Enumerator
AddressingModeWrap 

Wrap (Open GL ES 2 compatible)

AddressingModeMirror 

Mirror (Open GL ES 2 compatible)

AddressingModeClamp 

Clamp (Open GL ES 2 compatible)

AddressingModeMirrorOnce 

Mirror once (requires extension)

AddressingModeClampBorder 

Clamp to border.

◆ MipmapMode

Enumerator
MipmapModeBase 

When sampling texture, use only base level image, no mipmap images are used/needed.

MipmapModeNearest 

When sampling texture, pick one image, the nearest mipmap level, mipmap images are needed.

MipmapModeLinear 

When sampling texture, pick two nearest mipmap level images, mipmap images are needed.

Constructor & Destructor Documentation

◆ Sampler() [1/2]

kanzi::Sampler::Sampler ( )
explicit

◆ Sampler() [2/2]

kanzi::Sampler::Sampler ( const CreateInfo createInfo)
explicit

Member Function Documentation

◆ getMipmapMode()

MipmapMode kanzi::Sampler::getMipmapMode ( ) const

Gets the sampler mipmap mode.

◆ getMinificationFilter()

Filter kanzi::Sampler::getMinificationFilter ( ) const

Gets the sampler minification filter.

◆ getMagnificationFilter()

Filter kanzi::Sampler::getMagnificationFilter ( ) const

Gets the sampler magnification filter.

◆ getAddressingMode()

AddressingMode kanzi::Sampler::getAddressingMode ( ) const

Gets the sampler addressing mode.

◆ getDepthCompareFunction()

GraphicsCompareFunction kanzi::Sampler::getDepthCompareFunction ( ) const

Gets the depth compare function.

◆ getAnisotropy()

float kanzi::Sampler::getAnisotropy ( ) const

Gets the sampler anisotropy.

◆ getMipLodBias()

float kanzi::Sampler::getMipLodBias ( ) const

◆ getMinLod()

float kanzi::Sampler::getMinLod ( ) const

◆ getMaxLod()

float kanzi::Sampler::getMaxLod ( ) const

Friends And Related Function Documentation

◆ Texture

friend class Texture
friend

◆ swap

void swap ( Sampler left,
Sampler right 
)
friend

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