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/platform/graphics_backend/gl/sampler.hpp>

Classes

struct  CreateInfo
 

Public Types

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

Public Member Functions

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

Friends

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

Detailed Description

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

Member Enumeration Documentation

Enumerator
FilterNearest 
FilterLinear 
Enumerator
AddressingModeWrap 

Wrap (Open GL ES 2 compatible)

AddressingModeMirror 

Mirror.

AddressingModeClamp 

Clamp (Open GL ES 2 compatible)

AddressingModeMirrorOnce 

Mirror Once.

AddressingModeClampBorder 

Clamp to border.

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

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

Member Function Documentation

MipmapMode kanzi::Sampler::getMipmapMode ( ) const

Gets the sampler mipmap mode.

Filter kanzi::Sampler::getMinificationFilter ( ) const

Gets the sampler minification filter.

Filter kanzi::Sampler::getMagnificationFilter ( ) const

Gets the sampler magnification filter.

AddressingMode kanzi::Sampler::getAddressingMode ( ) const

Gets the sampler addressing mode.

float kanzi::Sampler::getAnisotropy ( ) const

Gets the sampler anisotropy.

float kanzi::Sampler::getMipLodBias ( ) const
float kanzi::Sampler::getMinLod ( ) const
float kanzi::Sampler::getMaxLod ( ) const

Friends And Related Function Documentation

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

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