OGRE
14.3
Object-Oriented Graphics Rendering Engine
|
This is the target render state. More...
#include <OgreShaderRenderState.h>
Public Member Functions | |
TargetRenderState () | |
Class default constructor. More... | |
~TargetRenderState () | |
void | acquirePrograms (Pass *pass) |
Acquire CPU/GPU programs set associated with the given render state and bind them to the pass. More... | |
void | addSubRenderStateInstance (SubRenderState *subRenderState) |
Add sub render state to this render state. More... | |
void | link (const RenderState &templateRS, Pass *srcPass, Pass *dstPass) |
Add the SubRenderStates of the given render state as templates to this render state. More... | |
void | link (const StringVector &srsTypes, Pass *srcPass, Pass *dstPass) |
Add the SubRenderStates to this render state. More... | |
void | releasePrograms (Pass *pass) |
Release CPU/GPU programs set associated with the given render state and pass. More... | |
void | updateGpuProgramsParams (Renderable *rend, const Pass *pass, const AutoParamDataSource *source, const LightList *pLightList) |
Update the GPU programs constant parameters before a renderable is rendered. More... | |
Public Member Functions inherited from Ogre::RTShader::RenderState | |
RenderState () | |
Class default constructor. More... | |
virtual | ~RenderState () |
Class destructor. More... | |
void | addTemplateSubRenderState (SubRenderState *subRenderState) |
Add a template sub render state to this render state. More... | |
void | addTemplateSubRenderStates (const StringVector &srsTypes) |
Add multiple template sub render states by SRS type. More... | |
int32 | getLightCount () const |
Get the maximal light count to consider. More... | |
bool | getLightCountAutoUpdate () const |
Return true if this render state override the light count. More... | |
SubRenderState * | getSubRenderState (const String &type) const |
get sub render state by type (uniquely identified) or NULL if not found More... | |
const SubRenderStateList & | getSubRenderStates () const |
Get the list of the sub render states composing this render state. More... | |
bool | haveAreaLights () const |
void | removeSubRenderState (SubRenderState *subRenderState) |
Remove a sub render state from this render state. More... | |
void | resetToBuiltinSubRenderStates () |
Reset this render state. More... | |
void | setHaveAreaLights (bool val) |
void | setLightCount (int32 lightCount) |
Set the maximal light count to consider. More... | |
void | setLightCountAutoUpdate (bool autoUpdate) |
Set the light count auto update state. More... | |
Static Public Attributes | |
static const char * | UserKey |
Key name for associating with a Pass instance. More... | |
This is the target render state.
This class will hold the actual generated CPU/GPU programs. It will be initially build from the FFP state of a given Pass by the FFP builder and then will be linked with the custom pass render state and the global scheme render state. See ShaderGenerator::SGPass::buildTargetRenderState().
Ogre::RTShader::TargetRenderState::TargetRenderState | ( | ) |
Class default constructor.
Ogre::RTShader::TargetRenderState::~TargetRenderState | ( | ) |
void Ogre::RTShader::TargetRenderState::link | ( | const RenderState & | templateRS, |
Pass * | srcPass, | ||
Pass * | dstPass | ||
) |
Add the SubRenderStates of the given render state as templates to this render state.
templateRS | The other render state to use as a template. |
srcPass | The source pass that this render state is constructed from. |
dstPass | The destination pass that constructed from this render state. |
void Ogre::RTShader::TargetRenderState::link | ( | const StringVector & | srsTypes, |
Pass * | srcPass, | ||
Pass * | dstPass | ||
) |
Add the SubRenderStates to this render state.
void Ogre::RTShader::TargetRenderState::updateGpuProgramsParams | ( | Renderable * | rend, |
const Pass * | pass, | ||
const AutoParamDataSource * | source, | ||
const LightList * | pLightList | ||
) |
Update the GPU programs constant parameters before a renderable is rendered.
rend | The renderable object that is going to be rendered. |
pass | The pass that is used to do the rendering operation. |
source | The auto parameter auto source instance. |
pLightList | The light list used for the current rendering operation. |
void Ogre::RTShader::TargetRenderState::addSubRenderStateInstance | ( | SubRenderState * | subRenderState | ) |
Add sub render state to this render state.
subRenderState | The sub render state to add. |
void Ogre::RTShader::TargetRenderState::acquirePrograms | ( | Pass * | pass | ) |
Acquire CPU/GPU programs set associated with the given render state and bind them to the pass.
pass | The pass to bind the programs to. |
void Ogre::RTShader::TargetRenderState::releasePrograms | ( | Pass * | pass | ) |
Release CPU/GPU programs set associated with the given render state and pass.
pass | The pass to release the programs from. |
|
static |
Key name for associating with a Pass instance.