Home | Namespaces | Hierarchy | Alphabetical List | Class list | Files | Namespace Members | Class members | File members |
#include <TextureUnit.h>
Public Member Functions | |
LayerBlendMode | getAlphaBlendMode () const |
Get multi texturing alpha blending mode. | |
LayerBlendMode | getColorBlendMode () const |
Get multi texturing color blending mode. | |
Texture * | getTexture () 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 |
Texture * | mTexture |
u32 | mTextureCoordSetIndex |
! 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.
render::TextureUnit::TextureUnit | ( | ) |
References render::LayerBlendMode::alphaArg1, render::LayerBlendMode::alphaArg2, alphaBlendMode, render::LayerBlendMode::blendType, render::LayerBlendMode::colorArg1, render::LayerBlendMode::colorArg2, colorBlendMode, render::LayerBlendMode::factor, render::LBS_CURRENT, render::LBS_TEXTURE, render::LBT_ALPHA, render::LBT_COLOR, render::LBX_MODULATE, mTextureCoordSetIndex, render::LayerBlendMode::operation, render::LayerBlendMode::source1, render::LayerBlendMode::source2, and render::Color::White.
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 | ( | 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.
LayerBlendMode render::TextureUnit::alphaBlendMode [protected] |
Referenced by getAlphaBlendMode(), setAlphaOperation(), and TextureUnit().
LayerBlendMode render::TextureUnit::colorBlendMode [protected] |
Referenced by getColorBlendMode(), setColorOperation(), and TextureUnit().
Texture* render::TextureUnit::mTexture [protected] |
Referenced by getTexture(), and setTexture().
u32 render::TextureUnit::mTextureCoordSetIndex [protected] |
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 KG Game Engine
Documentation © 2006-2011 by Kat'Oun. Generated on Sat Jul 2 2011 00:50:09 by
Doxygen
(1.7.4)
|