![]() |
OGRE 1.12.10
Object-Oriented Graphics Rendering Engine
|
A factory that enables creation of TextureAtlasSampler instances. More...
#include <OgreShaderExTextureAtlasSampler.h>
Classes | |
| struct | TextureAtlasAttib |
Public Types | |
| enum | IndexPositionMode { ipmRelative , ipmAbsolute } |
Public Member Functions | |
| TextureAtlasSamplerFactory () | |
| bool | addTexutreAtlasDefinition (const Ogre::String &filename, TextureAtlasTablePtr textureAtlasTable=TextureAtlasTablePtr()) |
| Adds a texture atlas definition from a stream. | |
| bool | addTexutreAtlasDefinition (DataStreamPtr stream, TextureAtlasTablePtr textureAtlasTable=TextureAtlasTablePtr()) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
| virtual SubRenderState * | createInstance (ScriptCompiler *compiler, PropertyAbstractNode *prop, Pass *pass, SGScriptTranslator *translator) |
| const TextureAtlasAttib & | getDefaultAtlasingAttributes () const |
| Returns the default attributes of texture atlas processing. | |
| const TextureAtlasTablePtr & | getTextureAtlasTable (const String &textureName) const |
| Retrieve the texture atlas table information for a given texture. | |
| virtual const String & | getType () const |
| bool | hasMaterialAtlasingAttributes (Ogre::Material *material, TextureAtlasAttib *attrib=NULL) const |
| Tells whether a specific material has atlas attributes associated with it. | |
| void | removeAllTextureAtlasTables () |
| Removes all texture atlas table information. | |
| void | removeTextureAtlasTable (const String &textureName) |
| Removes the texture atlas information from a given texture. | |
| void | setDefaultAtlasingAttributes (IndexPositionMode mode, ushort offset, bool autoAdjustBorders) |
| Set the default attributes concerning atlas texture processing. | |
| void | setMaterialAtlasingAttributes (Ogre::Material *material, IndexPositionMode mode, ushort offset, bool autoAdjustBorders) |
| Set the default attributes concerning atlas texture processing for a specific material. | |
| void | setTextureAtlasTable (const String &textureName, const TextureAtlasTablePtr &atlasData, bool autoBorderAdjust=true) |
| Set the texture atlas information for a given texture. | |
| virtual void | writeInstance (MaterialSerializer *ser, SubRenderState *subRenderState, Pass *srcPass, Pass *dstPass) |
| Public Member Functions inherited from Ogre::RTShader::SubRenderStateFactory | |
| SubRenderStateFactory () | |
| virtual | ~SubRenderStateFactory () |
| virtual SubRenderState * | createInstance () |
| Create an instance of the SubRenderState sub class it suppose to create. | |
| virtual SubRenderState * | createInstance (ScriptCompiler *compiler, PropertyAbstractNode *prop, TextureUnitState *texState, SGScriptTranslator *translator) |
| Create an instance of the SubRenderState based on script properties. | |
| virtual SubRenderState * | createOrRetrieveInstance (SGScriptTranslator *translator) |
| Retrieve the previous instance the SRS in the script translator or create a new instance if not found. | |
| virtual void | destroyAllInstances () |
| Destroy all the instances that created by this factory. | |
| virtual void | destroyInstance (SubRenderState *subRenderState) |
| Destroy the given instance. | |
| virtual void | writeInstance (MaterialSerializer *ser, SubRenderState *subRenderState, const TextureUnitState *srcTextureUnit, const TextureUnitState *dstTextureUnit) |
| Write the given sub-render state instance using the material serializer. | |
| Public Member Functions inherited from Ogre::Singleton< TextureAtlasSamplerFactory > | |
| ~Singleton (void) | |
Static Public Member Functions | |
| static TextureAtlasSamplerFactory & | getSingleton (void) |
| static TextureAtlasSamplerFactory * | getSingletonPtr (void) |
| Static Public Member Functions inherited from Ogre::Singleton< TextureAtlasSamplerFactory > | |
| static TextureAtlasSamplerFactory & | getSingleton (void) |
| Get the singleton instance. | |
| static TextureAtlasSamplerFactory * | getSingletonPtr (void) |
| Get the singleton instance. | |
A factory that enables creation of TextureAtlasSampler instances.
| Ogre::RTShader::TextureAtlasSamplerFactory::TextureAtlasSamplerFactory | ( | ) |
Referenced by getSingleton(), and getSingletonPtr().
|
static |
References TextureAtlasSamplerFactory().
|
static |
References TextureAtlasSamplerFactory().
|
virtual |
Implements Ogre::RTShader::SubRenderStateFactory.
|
virtual |
Reimplemented from Ogre::RTShader::SubRenderStateFactory.
|
virtual |
Reimplemented from Ogre::RTShader::SubRenderStateFactory.
| bool Ogre::RTShader::TextureAtlasSamplerFactory::addTexutreAtlasDefinition | ( | const Ogre::String & | filename, |
| TextureAtlasTablePtr | textureAtlasTable = TextureAtlasTablePtr() ) |
Adds a texture atlas definition from a stream.
This function loads a texture atlas definition file from a stream. The accepted format for this file is the NVidia Texture Atlas Tools ".tai" file format. This file as
The ".tai" format consist of lines, where each line corresponds to a specific texture in the texture atlas. Each line has the following format:
<original texture filename>/t/t<atlas filename>, <atlas idx>, <atlas type>, <woffset>, <hoffset>, <depth offset>, <width>, <height>
| filename | The full path to the file containing a ".tai" format data. |
| textureAtlasTable | A table into which the data in the stream will be filled. This parameter will be filled only if it is not null. The system factory keeps a copy of this information in any case. |
| bool Ogre::RTShader::TextureAtlasSamplerFactory::addTexutreAtlasDefinition | ( | DataStreamPtr | stream, |
| TextureAtlasTablePtr | textureAtlasTable = TextureAtlasTablePtr() ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
| void Ogre::RTShader::TextureAtlasSamplerFactory::setTextureAtlasTable | ( | const String & | textureName, |
| const TextureAtlasTablePtr & | atlasData, | ||
| bool | autoBorderAdjust = true ) |
Set the texture atlas information for a given texture.
| textureName | Name of an atlas texture |
| atlasData | A list of records containing the position and size of each texture in the atlas |
| autoBorderAdjust | Sets whether to automatically adjust the image polling area for border issues.See the Border issues paragraph under the class documentation for more information. |
| void Ogre::RTShader::TextureAtlasSamplerFactory::removeTextureAtlasTable | ( | const String & | textureName | ) |
Removes the texture atlas information from a given texture.
| textureName | Name of an atlas texture |
| void Ogre::RTShader::TextureAtlasSamplerFactory::removeAllTextureAtlasTables | ( | ) |
Removes all texture atlas table information.
| const TextureAtlasTablePtr & Ogre::RTShader::TextureAtlasSamplerFactory::getTextureAtlasTable | ( | const String & | textureName | ) | const |
Retrieve the texture atlas table information for a given texture.
| textureName | Name of an atlas texture |
| void Ogre::RTShader::TextureAtlasSamplerFactory::setDefaultAtlasingAttributes | ( | IndexPositionMode | mode, |
| ushort | offset, | ||
| bool | autoAdjustBorders ) |
Set the default attributes concerning atlas texture processing.
| mode | The index positioning mode. Tells relative to where the the texture coordinates containing the atlas image to use are positioned. |
| offset | The index positioning offset. Tells the offset relative to the index positioning mode. |
| autoAdjustBorders | Tells whether to automatically adjust the polled area in the texture relative to the used mipmap level. |
| const TextureAtlasAttib & Ogre::RTShader::TextureAtlasSamplerFactory::getDefaultAtlasingAttributes | ( | ) | const |
Returns the default attributes of texture atlas processing.
| void Ogre::RTShader::TextureAtlasSamplerFactory::setMaterialAtlasingAttributes | ( | Ogre::Material * | material, |
| IndexPositionMode | mode, | ||
| ushort | offset, | ||
| bool | autoAdjustBorders ) |
Set the default attributes concerning atlas texture processing for a specific material.
| material | The material to which to add the information |
| mode | The index positioning mode. Tells relative to where the the texture coordinates containing the atlas image to use are positioned. |
| offset | The index positioning offset. Tells the offset relative to the index positioning mode. |
| autoAdjustBorders | Tells whether to automatically adjust the polled area in the texture relative to the used mipmap level. |
| bool Ogre::RTShader::TextureAtlasSamplerFactory::hasMaterialAtlasingAttributes | ( | Ogre::Material * | material, |
| TextureAtlasAttib * | attrib = NULL ) const |
Tells whether a specific material has atlas attributes associated with it.
And returns the attributes to be used.