All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
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/graphics_3d/sampler.hpp>

Public Types

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

Public Member Functions

 Sampler (Texture *texture)
 
void configure (Filter minFilter, Filter magFilter, MipmapMode mipmapMode, AddressingMode addressing)
 
void setMipmapMode (MipmapMode value)
 Sets the sampler mipmap mode. More...
 
MipmapMode getMipmapMode () const
 Gets the sampler mipmap mode. More...
 
void setMinFilter (Filter value)
 Sets the sampler minification filter. More...
 
Filter getMinFilter () const
 Gets the sampler minification filter. More...
 
void setMagFilter (Filter value)
 Sets the sampler magnification filter. More...
 
Filter getMagFilter () const
 Gets the sampler magnification filter. More...
 
void setAddress (AddressingMode value)
 Sets the sampler addressing mode. More...
 
AddressingMode getAddress () const
 Gets the sampler addressing mode. More...
 
void setAnisotropy (float value)
 Sets the sampler anisotropy. Values less than 1.0 are clamped to 1.0. More...
 
float getAnisotropy () const
 Gets the sampler anisotropy. More...
 
void setMipLodBias (float value)
 
float getMipLodBias () const
 
void setMinLod (float value)
 
float getMinLod () const
 
void setMaxLod (float value)
 
float getMaxLod () const
 

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 ( Texture texture)
explicit

Member Function Documentation

void kanzi::Sampler::configure ( Filter  minFilter,
Filter  magFilter,
MipmapMode  mipmapMode,
AddressingMode  addressing 
)
void kanzi::Sampler::setMipmapMode ( MipmapMode  value)

Sets the sampler mipmap mode.

MipmapMode kanzi::Sampler::getMipmapMode ( ) const

Gets the sampler mipmap mode.

void kanzi::Sampler::setMinFilter ( Filter  value)

Sets the sampler minification filter.

Filter kanzi::Sampler::getMinFilter ( ) const

Gets the sampler minification filter.

void kanzi::Sampler::setMagFilter ( Filter  value)

Sets the sampler magnification filter.

Filter kanzi::Sampler::getMagFilter ( ) const

Gets the sampler magnification filter.

void kanzi::Sampler::setAddress ( AddressingMode  value)

Sets the sampler addressing mode.

AddressingMode kanzi::Sampler::getAddress ( ) const

Gets the sampler addressing mode.

void kanzi::Sampler::setAnisotropy ( float  value)

Sets the sampler anisotropy. Values less than 1.0 are clamped to 1.0.

float kanzi::Sampler::getAnisotropy ( ) const

Gets the sampler anisotropy.

void kanzi::Sampler::setMipLodBias ( float  value)
float kanzi::Sampler::getMipLodBias ( ) const
void kanzi::Sampler::setMinLod ( float  value)
float kanzi::Sampler::getMinLod ( ) const
void kanzi::Sampler::setMaxLod ( float  value)
float kanzi::Sampler::getMaxLod ( ) const

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