overview wiki api reference download
 All Classes Functions Variables Typedefs Enumerations Enumerator
Public Member Functions | Static Public Member Functions
gameplay::Texture::Sampler Class Reference

#include <Texture.h>

Inheritance diagram for gameplay::Texture::Sampler:
gameplay::Ref

List of all members.

Public Member Functions

virtual ~Sampler ()
void setWrapMode (Wrap wrapS, Wrap wrapT, Wrap wrapR=REPEAT)
void setFilterMode (Filter minificationFilter, Filter magnificationFilter)
TexturegetTexture () const
void bind ()

Static Public Member Functions

static Samplercreate (Texture *texture)
static Samplercreate (const char *path, bool generateMipmaps=false)

Detailed Description

Defines a texture sampler.

A texture sampler is basically an instance of a texture that can be used to sample a texture from a material. In addition to the texture itself, a sampler stores per-instance texture state information, such as wrap and filter modes.


Constructor & Destructor Documentation

virtual gameplay::Texture::Sampler::~Sampler ( ) [virtual]

Destructor.


Member Function Documentation

Binds the texture of this sampler to the renderer and applies the sampler state.

static Sampler* gameplay::Texture::Sampler::create ( Texture texture) [static]

Creates a sampler for the specified texture.

Parameters:
textureThe texture.
Returns:
The new sampler.
static Sampler* gameplay::Texture::Sampler::create ( const char *  path,
bool  generateMipmaps = false 
) [static]

Creates a sampler for the specified texture.

Parameters:
pathPath to the texture to create a sampler for.
generateMipmapsTrue to force a full mipmap chain to be generated for the texture, false otherwise.
Returns:
The new sampler.

Gets the texture for this sampler.

Returns:
The texture for this sampler.
void gameplay::Texture::Sampler::setFilterMode ( Filter  minificationFilter,
Filter  magnificationFilter 
)

Sets the texture filter modes for this sampler.

Parameters:
minificationFilterThe texture minification filter.
magnificationFilterThe texture magnification filter.
void gameplay::Texture::Sampler::setWrapMode ( Wrap  wrapS,
Wrap  wrapT,
Wrap  wrapR = REPEAT 
)

Sets the wrap mode for this sampler.

Parameters:
wrapSThe horizontal wrap mode.
wrapTThe vertical wrap mode.
wrapRThe depth wrap mode.
 All Classes Functions Variables Typedefs Enumerations Enumerator