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:

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]


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.

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

Creates a sampler for the specified texture.

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

Gets the texture for this sampler.

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

Sets the texture filter modes for this sampler.

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.

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