OGRE
1.12.13
Object-Oriented Graphics Rendering Engine
|
Implements texture atlas sampling. More...
#include <OgreShaderExTextureAtlasSampler.h>
Public Member Functions | |
TextureAtlasSampler () | |
Class default constructor. More... | |
virtual void | copyFrom (const SubRenderState &rhs) |
virtual int | getExecutionOrder () const |
virtual const String & | getType () const |
virtual bool | preAddToRenderState (const RenderState *renderState, Pass *srcPass, Pass *dstPass) |
virtual void | updateGpuProgramsParams (Renderable *rend, const Pass *pass, const AutoParamDataSource *source, const LightList *pLightList) |
Public Member Functions inherited from Ogre::RTShader::SubRenderState | |
SubRenderState () | |
Class default constructor. More... | |
virtual | ~SubRenderState () |
Class destructor. More... | |
virtual bool | createCpuSubPrograms (ProgramSet *programSet) |
Create sub programs that represents this sub render state as part of a program set. More... | |
SubRenderStateAccessorPtr | getAccessor () |
Return the accessor object to this sub render state. More... | |
SubRenderStateAccessorPtr | getAccessor () const |
Return the accessor object to this sub render state. More... | |
SubRenderState & | operator= (const SubRenderState &rhs) |
Operator = declaration. More... | |
virtual bool | setParameter (const String &name, const String &value) |
generic set method for parameters that connot be derived in preAddToRenderState More... | |
Static Public Attributes | |
static String | Type |
Implements texture atlas sampling.
This class implements a sub render state which allows sampling of a texture from a texture atlas.
Note: This class does not implement the entire texture sub-render state. It only implement the sampling of textures. This class needs to work in conjunction with the default FFPTexturing to work.
The first is the texture atlas table. This table consists of several records containing the position and size of each texture in the in the texture atlas. This information needs to be provided per atlas texture. The information is entered to the system though the TextureAtlasSamplerFactory using the functions setTextureAtlasTable and removeTextureAtlasTable.
The second information is the index of the record in the texture atlas table to which a given texture is associated with. This information is provided through an extra texture coordinate in the vertex buffer. This texture coordinate might can be placed either relative or in absolute position.
For example:
The position of the indexes can be controlled globally through the TextureAtlasSamplerFactory class using the function setTableIndexPosition The default index position is set to relative + 1.
You can use the NVidia "Texture Atlas Tools" to create the texture.
Ogre::RTShader::TextureAtlasSampler::TextureAtlasSampler | ( | ) |
Class default constructor.
|
virtual |
Implements Ogre::RTShader::SubRenderState.
|
virtual |
Implements Ogre::RTShader::SubRenderState.
|
virtual |
Implements Ogre::RTShader::SubRenderState.
|
virtual |
Reimplemented from Ogre::RTShader::SubRenderState.
|
virtual |
Reimplemented from Ogre::RTShader::SubRenderState.
|
static |