Home | Namespaces | Hierarchy | Alphabetical List | Class list | Files | Namespace Members | Class members | File members
Public Member Functions | Protected Attributes
render::TextureUnit Class Reference

#include <TextureUnit.h>

List of all members.

Public Member Functions

LayerBlendMode getAlphaBlendMode () const
 Get multi texturing alpha blending mode.
LayerBlendMode getColorBlendMode () const
 Get multi texturing color blending mode.
TexturegetTexture () const
 Gets the texture associated with this texture layer.
u32 getTextureCoordSet () const
 Gets the index of the set of texture coords this texture layer uses.
void setAlphaOperation (LayerBlendOperation op, LayerBlendSource source1=LBS_TEXTURE, LayerBlendSource source2=LBS_CURRENT, f32 arg1=1.0f, f32 arg2=1.0f, f32 manualBlend=0.0f)
void setColorOperation (LayerBlendOperation op, LayerBlendSource source1=LBS_TEXTURE, LayerBlendSource source2=LBS_CURRENT, const Color &arg1=Color::White, const Color &arg2=Color::White, f32 manualBlend=0.0f)
void setTexture (const std::string &filename)
 Sets the name of the texture associated with this texture layer.
void setTexture (Texture *texture)
void setTextureCoordSet (u32 set)
 Sets the index of the set of texture coords this texture layer uses.
 TextureUnit ()

Protected Attributes

LayerBlendMode alphaBlendMode
LayerBlendMode colorBlendMode
TexturemTexture
u32 mTextureCoordSetIndex

Detailed Description

! Class representing a single texture unit of a Material.

Texture units are pipelines for retrieving texture data for rendering onto your objects in the world. Using them is common to both the fixed-function and the programmable (vertex and fragment program) pipeline, but some of the settings will only have an effect in the fixed-function pipeline.


Constructor & Destructor Documentation

render::TextureUnit::TextureUnit ( )

Member Function Documentation

LayerBlendMode render::TextureUnit::getAlphaBlendMode ( ) const

Get multi texturing alpha blending mode.

References alphaBlendMode.

Referenced by render::RenderDriver::setTextureUnitSettings().

LayerBlendMode render::TextureUnit::getColorBlendMode ( ) const

Get multi texturing color blending mode.

References colorBlendMode.

Referenced by render::RenderDriver::setTextureUnitSettings().

Texture * render::TextureUnit::getTexture ( ) const

Gets the texture associated with this texture layer.

References mTexture.

Referenced by render::RenderDriver::setTextureUnitSettings().

u32 render::TextureUnit::getTextureCoordSet ( ) const

Gets the index of the set of texture coords this texture layer uses.

References mTextureCoordSetIndex.

Referenced by render::RenderDriver::setTextureUnitSettings().

void render::TextureUnit::setAlphaOperation ( LayerBlendOperation  op,
LayerBlendSource  source1 = LBS_TEXTURE,
LayerBlendSource  source2 = LBS_CURRENT,
f32  arg1 = 1.0f,
f32  arg2 = 1.0f,
f32  manualBlend = 0.0f 
)
void render::TextureUnit::setColorOperation ( LayerBlendOperation  op,
LayerBlendSource  source1 = LBS_TEXTURE,
LayerBlendSource  source2 = LBS_CURRENT,
const Color arg1 = Color::White,
const Color arg2 = Color::White,
f32  manualBlend = 0.0f 
)
void render::TextureUnit::setTexture ( Texture texture)

References mTexture.

void render::TextureUnit::setTexture ( const std::string &  filename)

Sets the name of the texture associated with this texture layer.

References resource::ResourceManager::getInstance(), mTexture, and resource::RT_RESOURCE_TEXTURE.

void render::TextureUnit::setTextureCoordSet ( u32  set)

Sets the index of the set of texture coords this texture layer uses.

References mTextureCoordSetIndex.


Member Data Documentation

Referenced by getTexture(), and setTexture().

The index of the set of texture coords this layer should use. Default is 0 for all layers. Only change this if you have provided multiple texture coords per vertex.

Referenced by getTextureCoordSet(), setTextureCoordSet(), and TextureUnit().


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

The KG Game Engine
The KG Game Engine Documentation © 2006-2011 by Kat'Oun. Generated on Sat Jul 2 2011 00:50:09 by Doxygen (1.7.4)