Dali 3D User Interface Engine
Enumerations | Functions
Dali::Internal::ImageSampler Namespace Reference

ImageSampler represents a set of sampling settings that can be applied to a texture. More...

Enumerations

enum  { MINIFY_BIT_SHIFT = 0, MAGNIFY_BIT_SHIFT = 4, UWRAP_BIT_SHIFT = 8, VWRAP_BIT_SHIFT = 12 }
 Bitshift values. More...
 
enum  { MASK_MINIFY_FILTER = 0x000F, MASK_MAGNIFY_FILTER = 0x00F0, MASK_UWRAP_MODE = 0x0F00, MASK_VWRAP_MODE = 0xF000 }
 Mask values. More...
 
enum  { DEFAULT_BITFIELD = (Dali::FilterMode::DEFAULT<<MINIFY_BIT_SHIFT) | (Dali::FilterMode::DEFAULT<<MAGNIFY_BIT_SHIFT) | (Dali::WrapMode::DEFAULT<<UWRAP_BIT_SHIFT) | (Dali::WrapMode::DEFAULT<<VWRAP_BIT_SHIFT) }
 Precalculate default sampler bitfield. More...
 

Functions

void StoreSamplingParameter (unsigned int &options, unsigned int mode, int bitShift)
 Utility to store one of the sampling parameters values. More...
 
unsigned int RetrieveSamplingParameter (unsigned int options, int mask, int bitShift)
 Utility to retrieve one of the FilterMode values. More...
 
unsigned int PackBitfield (FilterMode::Type minify, FilterMode::Type magnify, WrapMode::Type uWrap=WrapMode::DEFAULT, WrapMode::Type vWrap=WrapMode::DEFAULT)
 Pack the filter mode into a bitfield. More...
 
FilterMode::Type GetMinifyFilterMode (unsigned int bitfield)
 Return the minification filter from a packed bitfield. More...
 
FilterMode::Type GetMagnifyFilterMode (unsigned int bitfield)
 Return the magnification filter from a packed bitfield. More...
 
WrapMode::Type GetUWrapMode (unsigned int bitfield)
 Return the wrap mode in x direction from a packed bitfield. More...
 
WrapMode::Type GetVWrapMode (unsigned int bitfield)
 Return the wrap mode in y direction from a packed bitfield. More...
 

Detailed Description

ImageSampler represents a set of sampling settings that can be applied to a texture.

Enumeration Type Documentation

anonymous enum

Bitshift values.

Enumerator
MINIFY_BIT_SHIFT 
MAGNIFY_BIT_SHIFT 
UWRAP_BIT_SHIFT 
VWRAP_BIT_SHIFT 

Definition at line 38 of file image-sampler.h.

anonymous enum

Mask values.

Enumerator
MASK_MINIFY_FILTER 
MASK_MAGNIFY_FILTER 
MASK_UWRAP_MODE 
MASK_VWRAP_MODE 

Definition at line 49 of file image-sampler.h.

anonymous enum

Precalculate default sampler bitfield.

Enumerator
DEFAULT_BITFIELD 

Definition at line 60 of file image-sampler.h.

Function Documentation

FilterMode::Type Dali::Internal::ImageSampler::GetMagnifyFilterMode ( unsigned int  bitfield)

Return the magnification filter from a packed bitfield.

Returns
Return the magnification filter.

Definition at line 77 of file image-sampler.cpp.

References MAGNIFY_BIT_SHIFT, MASK_MAGNIFY_FILTER, and RetrieveSamplingParameter().

Referenced by Dali::Internal::Texture::ApplySampler().

Here is the call graph for this function:

Here is the caller graph for this function:

FilterMode::Type Dali::Internal::ImageSampler::GetMinifyFilterMode ( unsigned int  bitfield)

Return the minification filter from a packed bitfield.

Returns
Return the minification filter.

Definition at line 72 of file image-sampler.cpp.

References MASK_MINIFY_FILTER, MINIFY_BIT_SHIFT, and RetrieveSamplingParameter().

Referenced by Dali::Internal::Texture::ApplySampler().

Here is the call graph for this function:

Here is the caller graph for this function:

WrapMode::Type Dali::Internal::ImageSampler::GetUWrapMode ( unsigned int  bitfield)

Return the wrap mode in x direction from a packed bitfield.

Returns
Return the wrap mode.

Definition at line 82 of file image-sampler.cpp.

References MASK_UWRAP_MODE, RetrieveSamplingParameter(), and UWRAP_BIT_SHIFT.

Referenced by Dali::Internal::Texture::ApplySampler().

Here is the call graph for this function:

Here is the caller graph for this function:

WrapMode::Type Dali::Internal::ImageSampler::GetVWrapMode ( unsigned int  bitfield)

Return the wrap mode in y direction from a packed bitfield.

Returns
Return the wrap mode.

Definition at line 87 of file image-sampler.cpp.

References MASK_VWRAP_MODE, RetrieveSamplingParameter(), and VWRAP_BIT_SHIFT.

Referenced by Dali::Internal::Texture::ApplySampler().

Here is the call graph for this function:

Here is the caller graph for this function:

unsigned int Dali::Internal::ImageSampler::PackBitfield ( FilterMode::Type  minify,
FilterMode::Type  magnify,
WrapMode::Type  uWrap = WrapMode::DEFAULT,
WrapMode::Type  vWrap = WrapMode::DEFAULT 
)

Pack the filter mode into a bitfield.

Parameters
[in]minifyThe minification filter.
[in]magnifyThe magnification filter.
Returns
Return the packed bitfield.

Definition at line 62 of file image-sampler.cpp.

References MAGNIFY_BIT_SHIFT, MINIFY_BIT_SHIFT, StoreSamplingParameter(), UWRAP_BIT_SHIFT, and VWRAP_BIT_SHIFT.

Referenced by Dali::Internal::Render::Renderer::BindTextures(), and Dali::Internal::SceneGraph::Shader::SetUniforms().

Here is the call graph for this function:

Here is the caller graph for this function:

unsigned int Dali::Internal::ImageSampler::RetrieveSamplingParameter ( unsigned int  options,
int  mask,
int  bitShift 
)

Utility to retrieve one of the FilterMode values.

Parameters
[in]optionsA bitmask of filter values.
[in]maskThe used to mask unwanted values.
[in]bitshiftUsed to shift to the correct part of options.
Returns
Return the filter mode.

Definition at line 54 of file image-sampler.cpp.

Referenced by GetMagnifyFilterMode(), GetMinifyFilterMode(), GetUWrapMode(), and GetVWrapMode().

Here is the caller graph for this function:

void Dali::Internal::ImageSampler::StoreSamplingParameter ( unsigned int &  options,
unsigned int  mode,
int  bitShift 
)

Utility to store one of the sampling parameters values.

Parameters
[out]optionsA bitmask used to store the FilterMode values.
[in]factorThe FilterMode value.
[in]bitshiftUsed to shift to the correct part of options.

Definition at line 39 of file image-sampler.cpp.

Referenced by PackBitfield().

Here is the caller graph for this function:

Dali Docs Home
Read more about Dali