![]() |
OGRE
1.10.12
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 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... | |
virtual int | getExecutionOrder () const |
virtual const String & | getType () const |
virtual bool | preAddToRenderState (const RenderState *renderState, Pass *srcPass, Pass *dstPass) |
virtual void | updateGpuProgramsParams (Renderable *rend, Pass *pass, const AutoParamDataSource *source, const LightList *pLightList) |
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.
|
virtualinherited |
Create sub programs that represents this sub render state as part of a program set.
The given program set contains CPU programs that represents a vertex shader and pixel shader. One should use these program class API to create a representation of the sub state he wished to implement.
programSet | container class of CPU and GPU programs that this sub state will affect on. |
Reimplemented in Ogre::RTShader::FFPTransform.
|
inherited |
Return the accessor object to this sub render state.
|
inherited |
Return the accessor object to this sub render state.
|
static |