Public Types | Public Member Functions | Public Attributes | Static Public Attributes

Tiny2D::Sampler Struct Reference

Texture sampler description. More...

#include <Tiny2D.h>

List of all members.

Public Types

enum  WrapMode {
  WrapMode_Clamp = 0, WrapMode_ClampToBorder, WrapMode_Repeat, WrapMode_Mirror,
  WrapMode_COUNT
}
 

Texture wrap modes.

More...

Public Member Functions

 Sampler ()
 Constructs default sampler.
void SetFiltering (bool minLinear, bool magLinear)
 Sets minimization and magnification filtering to linear (true) or nearest (false)
void SetWrapMode (WrapMode u, WrapMode v, const Color &borderColor=Color::White)
 Sets wrap mode for U and V texture coordinates; also sets optional borderColor.

Public Attributes

bool minFilterLinear
 Indicates whether minimization filter shall be linear (nearest otherwise); defaults to true.
bool magFilterLinear
 Indicates whether maximization filter shall be linear (nearest otherwise); defaults to true.
WrapMode uWrapMode
 U wrapping mode; defaults to WrapMode_Clamp.
WrapMode vWrapMode
 V wrapping mode; defaults to WrapMode_Clamp.
Color borderColor
 Border color; defaults to Color::White; unused on mobile platforms (OpenGL ES does not support WrapMode_ClampToBorder)

Static Public Attributes

static Sampler Default
 Default sampler (for use with 2D sprite style graphics)
static Sampler DefaultPostprocess
 Default sampler for use with postprocessing (both min and mag linear filtering disabled)

Detailed Description

Texture sampler description.


Member Enumeration Documentation

Texture wrap modes.

Enumerator:
WrapMode_Clamp 

Clamps to edges.

WrapMode_ClampToBorder 

Clamps to border color (specified via Sampler::borderColor); note: not supported on OpenGL ES platforms (falls back to WrapMode_Clamp)

WrapMode_Repeat 

Repeats.

WrapMode_Mirror 

Mirrors repeatedly.

WrapMode_COUNT 

Constructor & Destructor Documentation

Tiny2D::Sampler::Sampler (  )

Constructs default sampler.


Member Function Documentation

void Tiny2D::Sampler::SetFiltering ( bool  minLinear,
bool  magLinear 
) [inline]

Sets minimization and magnification filtering to linear (true) or nearest (false)

void Tiny2D::Sampler::SetWrapMode ( WrapMode  u,
WrapMode  v,
const Color borderColor = Color::White 
) [inline]

Sets wrap mode for U and V texture coordinates; also sets optional borderColor.


Member Data Documentation

Border color; defaults to Color::White; unused on mobile platforms (OpenGL ES does not support WrapMode_ClampToBorder)

Default sampler (for use with 2D sprite style graphics)

Default sampler for use with postprocessing (both min and mag linear filtering disabled)

Indicates whether maximization filter shall be linear (nearest otherwise); defaults to true.

Indicates whether minimization filter shall be linear (nearest otherwise); defaults to true.

U wrapping mode; defaults to WrapMode_Clamp.

V wrapping mode; defaults to WrapMode_Clamp.


The documentation for this struct was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines