Loading...
Searching...
No Matches
Ogre::RTShader::ShaderGenerator Class Reference
Optional Components » RTShaderSystem

Shader generator system main interface. More...

`#include <OgreShaderGenerator.h>`

Inheritance diagram for Ogre::RTShader::ShaderGenerator:
[legend]

## Public Types

typedef std::pair< RenderState *, bool > | RenderStateCreateOrRetrieveResult

## Public Member Functions

void | _setActiveSceneManager (SceneManager *sceneManager)
| Set the active scene manager against which new render states are compiled.
void | addSceneManager (SceneManager *sceneMgr)
| Add a scene manager to the shader generator scene managers list.
void | addSubRenderStateFactory (SubRenderStateFactory *factory)
| Add sub render state factory.
bool | cloneShaderBasedTechniques (Material &srcMat, Material &dstMat)
| Clone all shader based techniques from one material to another.
RenderStateCreateOrRetrieveResult | createOrRetrieveRenderState (const String &schemeName)
| Returns a requested render state.
void | createScheme (const String &schemeName)
| Create a scheme.
bool | createShaderBasedTechnique (const Material &srcMat, const String &srcTechniqueSchemeName, const String &dstTechniqueSchemeName, bool overProgrammable=false)
| Create shader based technique from a given technique.
bool | createShaderBasedTechnique (const Technique *srcTech, const String &dstTechniqueSchemeName, bool overProgrammable=false)
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
template<typename T>
T * | createSubRenderState ()
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
SubRenderState * | createSubRenderState (const String &type)
| Create an instance of sub render state from a given type.
void | destroySubRenderState (SubRenderState *subRenderState)
| Destroy an instance of sub render state.
void | flushShaderCache ()
| Flush the shader cache.
SceneManager * | getActiveSceneManager ()
| Get the active scene manager that is doint the actual scene rendering.
bool | getCreateShaderOverProgrammablePass () const
| Returns whether shaders are created for passes with shaders.
MaterialSerializer::Listener * | getMaterialSerializerListener ()
| Return custom material Serializer of the shader generator.
size_t | getNumSubRenderStateFactories () const
| Returns the number of existing factories.
RenderState * | getRenderState (const String &schemeName)
| Return a global render state associated with the given scheme name.
RenderState * | getRenderState (const String &schemeName, const Material &mat, uint16 passIndex=0)
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
RenderState * | getRenderState (const String &schemeName, const String &materialName, const String &groupName, unsigned short passIndex)
| Get render state of specific pass.
const String & | getRTShaderScheme (size_t index) const
| Returns the scheme name used in the for RT shader generation by index.
size_t | getRTShaderSchemeCount () const
| Returns the amount of schemes used in the for RT shader generation.
const String & | getShaderCachePath () const
| Get the output shader cache path.
size_t | getShaderCount (GpuProgramType type) const
| Return the current number of generated shaders.
const String & | getShaderProfiles (GpuProgramType type) const
| Get the output shader target profiles.
SubRenderStateFactory * | getSubRenderStateFactory (const String &type)
| Returns a sub render state factory by name.
SubRenderStateFactory * | getSubRenderStateFactory (size_t index)
| Returns a sub render state factory by index.
const String & | getTargetLanguage () const
| Return the target shader language currently in use.
bool | getTargetLinearColours () const
VSOutputCompactPolicy | getVertexShaderOutputsCompactPolicy () const
| Get the vertex shader outputs compaction policy.
bool | hasRenderState (const String &schemeName) const
| Tells if a given render state exists.
bool | hasShaderBasedTechnique (const Material &mat, const String &srcTechniqueSchemeName, const String &dstTechniqueSchemeName) const
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
bool | hasShaderBasedTechnique (const String &materialName, const String &groupName, const String &srcTechniqueSchemeName, const String &dstTechniqueSchemeName) const
| Checks if a shader based technique has been created for a given technique.
void | invalidateMaterial (const String &schemeName, const Material &mat)
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
void | invalidateMaterial (const String &schemeName, const String &materialName, const String &groupName=RGN_DEFAULT) const
| Invalidate specific material scheme.
void | invalidateMaterialIlluminationPasses (const String &schemeName, const String &materialName, const String &groupName=RGN_DEFAULT) const
| Invalidate specific material scheme.
void | invalidateScheme (const String &schemeName) const
| Invalidate a given scheme.
void | removeAllShaderBasedTechniques ()
| Remove all shader based techniques that created by this shader generator.
bool | removeAllShaderBasedTechniques (const Material &mat)
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
bool | removeAllShaderBasedTechniques (const String &materialName, const String &groupName=RGN_DEFAULT)
| Remove all shader based techniques of the given material.
void | removeSceneManager (SceneManager *sceneMgr)
| Remove a scene manager from the shader generator scene managers list.
bool | removeShaderBasedTechnique (const Technique *srcTech, const String &dstTechniqueSchemeName)
| Remove shader based technique from a given technique.
void | removeSubRenderStateFactory (SubRenderStateFactory *factory)
| Remove sub render state factory.
void | setCreateShaderOverProgrammablePass (bool value)
| Sets whether shaders are created for passes with shaders.
void | setShaderCachePath (const String &cachePath)
| Set the output shader cache path.
void | setShaderProfiles (GpuProgramType type, const String &shaderProfiles)
| Set the output shader target profiles.
void | setTargetLanguage (const String &shaderLanguage)
| Set the target shader language.
void | setTargetLinearColours (bool linear)
| Set whether the shaders should target the linear colour space - e.g.
void | setVertexShaderOutputsCompactPolicy (VSOutputCompactPolicy policy)
| Set the vertex shader outputs compaction policy.
void | validateMaterial (const String &schemeName, const Material &mat) const
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
bool | validateMaterial (const String &schemeName, const String &materialName, const String &groupName=RGN_DEFAULT) const
| Validate specific material scheme.
bool | validateMaterialIlluminationPasses (const String &schemeName, const String &materialName, const String &groupName=RGN_DEFAULT) const
| Validate specific material scheme.
bool | validateScheme (const String &schemeName) const
| Validate a given scheme.
Public Member Functions inherited from Ogre::Singleton< ShaderGenerator >
| ~Singleton (void)

## Static Public Member Functions

static void | _markNonFFP (const TextureUnitState *tu)
| mark the given texture unit as non-FFP
static void | destroy ()
| Destroy the Shader Generator instance.
static ShaderGenerator & | getSingleton ()
| Override standard Singleton retrieval.
static ShaderGenerator * | getSingletonPtr ()
| Get the singleton instance.
static bool | initialize ()
| Initialize the Shader Generator System.
Static Public Member Functions inherited from Ogre::Singleton< ShaderGenerator >
static ShaderGenerator & | getSingleton (void)
| Get the singleton instance.
static ShaderGenerator * | getSingletonPtr (void)
| Get the singleton instance.

## Static Public Attributes

static String | DEFAULT_SCHEME_NAME
| same as MSN_SHADERGEN

## Detailed Description

Shader generator system main interface.

This singleton based class enables automatic generation of shader code based on existing material techniques.

## Member Typedef Documentation

## RenderStateCreateOrRetrieveResult

typedef std::pair<RenderState*, bool> Ogre::RTShader::ShaderGenerator::RenderStateCreateOrRetrieveResult

## Member Function Documentation

## initialize()

bool Ogre::RTShader::ShaderGenerator::initialize | ( |  | ) |

static

Initialize the Shader Generator System.

Return true upon success.

## destroy()

void Ogre::RTShader::ShaderGenerator::destroy | ( |  | ) |

static

Destroy the Shader Generator instance.

## getSingleton()

ShaderGenerator & Ogre::RTShader::ShaderGenerator::getSingleton | ( |  | ) |

static

Override standard Singleton retrieval.

Why do we do this? Well, it's because the Singleton implementation is in a .h file, which means it gets compiled into anybody who includes it. This is needed for the Singleton template to work, but we actually only want it compiled into the implementation of the class based on the Singleton, not all of them. If we don't change this, we get link errors when trying to use the Singleton-based class from an outside dll.

  This method just delegates to the template version anyway, but the implementation stays in this single compilation unit, preventing link errors.

## getSingletonPtr()

ShaderGenerator * Ogre::RTShader::ShaderGenerator::getSingletonPtr | ( |  | ) |

static

Get the singleton instance.

## addSceneManager()

void Ogre::RTShader::ShaderGenerator::addSceneManager | ( | SceneManager * | sceneMgr | ) |

Add a scene manager to the shader generator scene managers list.

Parameters

  sceneMgr | The scene manager to add to the list.

## removeSceneManager()

void Ogre::RTShader::ShaderGenerator::removeSceneManager | ( | SceneManager * | sceneMgr | ) |

Remove a scene manager from the shader generator scene managers list.

Parameters

  sceneMgr | The scene manager to remove from the list.

## getActiveSceneManager()

SceneManager * Ogre::RTShader::ShaderGenerator::getActiveSceneManager | ( |  | ) |

Get the active scene manager that is doint the actual scene rendering.

This attribute will be update on the call to preFindVisibleObjects.

## _setActiveSceneManager()

void Ogre::RTShader::ShaderGenerator::_setActiveSceneManager | ( | SceneManager * | sceneManager | ) |

Set the active scene manager against which new render states are compiled.

Note that normally the setting of the active scene manager is updated through the preFindVisibleObjects method.

## setTargetLanguage()

void Ogre::RTShader::ShaderGenerator::setTargetLanguage | ( | const String & | shaderLanguage | ) |

Set the target shader language.

Parameters

  shaderLanguage | The output shader language to use.

Remarks
  The default shader language is cg.

## getTargetLanguage()

const String & Ogre::RTShader::ShaderGenerator::getTargetLanguage | ( |  | ) | const

inline

Return the target shader language currently in use.

## setShaderProfiles()

void Ogre::RTShader::ShaderGenerator::setShaderProfiles | ( | GpuProgramType | type,
|  | const String & | shaderProfiles )

Set the output shader target profiles.

Parameters

  type | shader type
  shaderProfiles | The target profiles for the shader.

## getShaderProfiles()

const String & Ogre::RTShader::ShaderGenerator::getShaderProfiles | ( | GpuProgramType | type | ) | const

Get the output shader target profiles.

## setShaderCachePath()

void Ogre::RTShader::ShaderGenerator::setShaderCachePath | ( | const String & | cachePath | ) |

Set the output shader cache path.

Generated shader code will be written to this path. In case of empty cache path shaders will be generated directly from system memory.

Parameters

  cachePath | The cache path of the shader. The default is empty cache path.

## getShaderCachePath()

const String & Ogre::RTShader::ShaderGenerator::getShaderCachePath | ( |  | ) | const

inline

Get the output shader cache path.

## flushShaderCache()

void Ogre::RTShader::ShaderGenerator::flushShaderCache | ( |  | ) |

Flush the shader cache.

This operation will cause all active schemes to be invalidated and will destroy any CPU/GPU program that created by this shader generator.

## getRenderState() [1/3]

RenderState * Ogre::RTShader::ShaderGenerator::getRenderState | ( | const String & | schemeName | ) |

Return a global render state associated with the given scheme name.

Modifying this render state will affect all techniques that belongs to that scheme. This is the best way to apply global changes to all techniques. After altering the render state one should call invalidateScheme method in order to regenerate shaders.

Parameters

  schemeName | The destination scheme name.

Referenced by getRenderState().

## createOrRetrieveRenderState()

RenderStateCreateOrRetrieveResult Ogre::RTShader::ShaderGenerator::createOrRetrieveRenderState | ( | const String & | schemeName | ) |

Returns a requested render state.

If the render state does not exist this function creates it.

Parameters

  schemeName | The scheme name to retrieve.

## hasRenderState()

bool Ogre::RTShader::ShaderGenerator::hasRenderState | ( | const String & | schemeName | ) | const

inline

Tells if a given render state exists.

Parameters

  schemeName | The scheme name to check.

## getRenderState() [2/3]

RenderState * Ogre::RTShader::ShaderGenerator::getRenderState | ( | const String & | schemeName,
|  | const String & | materialName,
|  | const String & | groupName,
|  | unsigned short | passIndex )

Get render state of specific pass.

Using this method allows the user to customize the behavior of a specific pass.

Parameters

  schemeName | The destination scheme name.
  materialName | The specific material name.
  groupName | The specific material name.
  passIndex | The pass index.

## getRenderState() [3/3]

RenderState * Ogre::RTShader::ShaderGenerator::getRenderState | ( | const String & | schemeName,
|  | const Material & | mat,
|  | uint16 | passIndex = 0 )

inline

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

References Ogre::Resource::getGroup(), Ogre::Resource::getName(), and getRenderState().

## addSubRenderStateFactory()

void Ogre::RTShader::ShaderGenerator::addSubRenderStateFactory | ( | SubRenderStateFactory * | factory | ) |

Add sub render state factory.

Plugins or 3d party applications may implement sub classes of SubRenderState interface. Add the matching factory will allow the application to create instances of these sub classes.

Parameters

  factory | The factory to add.

## getNumSubRenderStateFactories()

size_t Ogre::RTShader::ShaderGenerator::getNumSubRenderStateFactories | ( |  | ) | const

Returns the number of existing factories.

## getSubRenderStateFactory() [1/2]

SubRenderStateFactory * Ogre::RTShader::ShaderGenerator::getSubRenderStateFactory | ( | size_t | index | ) |

Returns a sub render state factory by index.

Note
  index must be lower than the value returned by getNumSubRenderStateFactories()

## getSubRenderStateFactory() [2/2]

SubRenderStateFactory * Ogre::RTShader::ShaderGenerator::getSubRenderStateFactory | ( | const String & | type | ) |

Returns a sub render state factory by name.

## removeSubRenderStateFactory()

void Ogre::RTShader::ShaderGenerator::removeSubRenderStateFactory | ( | SubRenderStateFactory * | factory | ) |

Remove sub render state factory.

Parameters

  factory | The factory to remove.

## createSubRenderState() [1/2]

SubRenderState * Ogre::RTShader::ShaderGenerator::createSubRenderState | ( | const String & | type | ) |

Create an instance of sub render state from a given type.

Parameters

  type | The type of sub render state to create.

Referenced by createSubRenderState(), and SGSceneManagerListener.

## createSubRenderState() [2/2]

template<typename T>

T * Ogre::RTShader::ShaderGenerator::createSubRenderState | ( |  | ) |

inline

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

References createSubRenderState().

## destroySubRenderState()

void Ogre::RTShader::ShaderGenerator::destroySubRenderState | ( | SubRenderState * | subRenderState | ) |

Destroy an instance of sub render state.

Parameters

  subRenderState | The instance to destroy.

## hasShaderBasedTechnique() [1/2]

bool Ogre::RTShader::ShaderGenerator::hasShaderBasedTechnique | ( | const String & | materialName,
|  | const String & | groupName,
|  | const String & | srcTechniqueSchemeName,
|  | const String & | dstTechniqueSchemeName ) const

Checks if a shader based technique has been created for a given technique.

Return true if exist. False if not.

Parameters

  materialName | The source material name.
  groupName | The source group name.
  srcTechniqueSchemeName | The source technique scheme name.
  dstTechniqueSchemeName | The destination shader based technique scheme name.

Referenced by hasShaderBasedTechnique().

## hasShaderBasedTechnique() [2/2]

bool Ogre::RTShader::ShaderGenerator::hasShaderBasedTechnique | ( | const Material & | mat,
|  | const String & | srcTechniqueSchemeName,
|  | const String & | dstTechniqueSchemeName ) const

inline

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

References Ogre::Resource::getGroup(), Ogre::Resource::getName(), and hasShaderBasedTechnique().

## createShaderBasedTechnique() [1/2]

bool Ogre::RTShader::ShaderGenerator::createShaderBasedTechnique | ( | const Material & | srcMat,
|  | const String & | srcTechniqueSchemeName,
|  | const String & | dstTechniqueSchemeName,
|  | bool | overProgrammable = false )

Create shader based technique from a given technique.

Return true upon success. Failure may occur if the source technique is not FFP pure, or different source technique is mapped to the requested destination scheme.

Parameters

  srcMat | The source material.
  srcTechniqueSchemeName | The source technique scheme name.
  dstTechniqueSchemeName | The destination shader based technique scheme name.
  overProgrammable | If true a shader will be created even if the pass already has shaders

## createShaderBasedTechnique() [2/2]

bool Ogre::RTShader::ShaderGenerator::createShaderBasedTechnique | ( | const Technique * | srcTech,
|  | const String & | dstTechniqueSchemeName,
|  | bool | overProgrammable = false )

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

## removeShaderBasedTechnique()

bool Ogre::RTShader::ShaderGenerator::removeShaderBasedTechnique | ( | const Technique * | srcTech,
|  | const String & | dstTechniqueSchemeName )

Remove shader based technique from a given technique.

Return true upon success. Failure may occur if the given source technique was not previously registered successfully using the createShaderBasedTechnique method.

Parameters

  srcTech | The source technique.
  dstTechniqueSchemeName | The destination shader based technique scheme name.

## removeAllShaderBasedTechniques() [1/3]

bool Ogre::RTShader::ShaderGenerator::removeAllShaderBasedTechniques | ( | const String & | materialName,
|  | const String & | groupName = RGN_DEFAULT )

Remove all shader based techniques of the given material.

Return true upon success.

Parameters

  materialName | The source material name.
  groupName | The source group name.

References OGRE_RESOURCE_GROUP_INIT.

Referenced by removeAllShaderBasedTechniques().

## removeAllShaderBasedTechniques() [2/3]

bool Ogre::RTShader::ShaderGenerator::removeAllShaderBasedTechniques | ( | const Material & | mat | ) |

inline

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

References Ogre::Resource::getGroup(), Ogre::Resource::getName(), and removeAllShaderBasedTechniques().

## cloneShaderBasedTechniques()

bool Ogre::RTShader::ShaderGenerator::cloneShaderBasedTechniques | ( | Material & | srcMat,
|  | Material & | dstMat )

Clone all shader based techniques from one material to another.

This function can be used in conjunction with the Material::clone() function to copy both material properties and RTSS state from one material to another.

Parameters

  srcMat | The source material
  dstMat | The destination material

Returns
  True if successful

## removeAllShaderBasedTechniques() [3/3]

void Ogre::RTShader::ShaderGenerator::removeAllShaderBasedTechniques | ( |  | ) |

Remove all shader based techniques that created by this shader generator.

## createScheme()

void Ogre::RTShader::ShaderGenerator::createScheme | ( | const String & | schemeName | ) |

Create a scheme.

Parameters

  schemeName | The scheme name to create.

## invalidateScheme()

void Ogre::RTShader::ShaderGenerator::invalidateScheme | ( | const String & | schemeName | ) | const

inline

Invalidate a given scheme.

This action will lead to shader regeneration of all techniques belongs to the given scheme name.

Parameters

  schemeName | The scheme to invalidate.

## validateScheme()

bool Ogre::RTShader::ShaderGenerator::validateScheme | ( | const String & | schemeName | ) | const

Validate a given scheme.

This action will generate shader programs for all techniques of the given scheme name.

Parameters

  schemeName | The scheme to validate.

## invalidateMaterial() [1/2]

void Ogre::RTShader::ShaderGenerator::invalidateMaterial | ( | const String & | schemeName,
|  | const String & | materialName,
|  | const String & | groupName = RGN_DEFAULT ) const

inline

Invalidate specific material scheme.

This action will lead to shader regeneration of the technique belongs to the given scheme name.

Parameters

  schemeName | The scheme to invalidate.
  materialName | The material to invalidate.
  groupName | The source group name.

References OGRE_RESOURCE_GROUP_INIT.

Referenced by invalidateMaterial().

## invalidateMaterial() [2/2]

void Ogre::RTShader::ShaderGenerator::invalidateMaterial | ( | const String & | schemeName,
|  | const Material & | mat )

inline

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

References Ogre::Resource::getGroup(), Ogre::Resource::getName(), and invalidateMaterial().

## validateMaterial() [1/2]

bool Ogre::RTShader::ShaderGenerator::validateMaterial | ( | const String & | schemeName,
|  | const String & | materialName,
|  | const String & | groupName = RGN_DEFAULT ) const

Validate specific material scheme.

This action will generate shader programs for the technique of the given scheme name.

Parameters

  schemeName | The scheme to validate.
  materialName | The material to validate.
  groupName | The source group name.

References OGRE_RESOURCE_GROUP_INIT.

Referenced by validateMaterial().

## validateMaterial() [2/2]

void Ogre::RTShader::ShaderGenerator::validateMaterial | ( | const String & | schemeName,
|  | const Material & | mat ) const

inline

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

References Ogre::Resource::getGroup(), Ogre::Resource::getName(), and validateMaterial().

## invalidateMaterialIlluminationPasses()

void Ogre::RTShader::ShaderGenerator::invalidateMaterialIlluminationPasses | ( | const String & | schemeName,
|  | const String & | materialName,
|  | const String & | groupName = RGN_DEFAULT ) const

inline

Invalidate specific material scheme.

This action will lead to shader regeneration of the technique belongs to the given scheme name.

Parameters

  schemeName | The scheme to invalidate.
  materialName | The material to invalidate.
  groupName | The source group name.

References OGRE_RESOURCE_GROUP_INIT.

## validateMaterialIlluminationPasses()

bool Ogre::RTShader::ShaderGenerator::validateMaterialIlluminationPasses | ( | const String & | schemeName,
|  | const String & | materialName,
|  | const String & | groupName = RGN_DEFAULT ) const

Validate specific material scheme.

This action will generate shader programs illumination passes of the technique of the given scheme name.

Parameters

  schemeName | The scheme to validate.
  materialName | The material to validate.
  groupName | The source group name.

References OGRE_RESOURCE_GROUP_INIT.

## getMaterialSerializerListener()

MaterialSerializer::Listener * Ogre::RTShader::ShaderGenerator::getMaterialSerializerListener | ( |  | ) |

Return custom material Serializer of the shader generator.

This is useful when you'd like to export certain material that contains shader generator effects. I.E - when writing an exporter you may want mark your material as shader generated material so in the next time you will load it by your application it will automatically generate shaders with custom attributes you wanted. To do it you'll have to do the following steps:

1. Create shader based technique for you material via the createShaderBasedTechnique() method.
2. Create MaterialSerializer instance.
3. Add the return instance of serializer listener to the MaterialSerializer.
4. Call one of the export methods of MaterialSerializer.

## getShaderCount()

size_t Ogre::RTShader::ShaderGenerator::getShaderCount | ( | GpuProgramType | type | ) | const

Return the current number of generated shaders.

## setVertexShaderOutputsCompactPolicy()

void Ogre::RTShader::ShaderGenerator::setVertexShaderOutputsCompactPolicy | ( | VSOutputCompactPolicy | policy | ) |

inline

Set the vertex shader outputs compaction policy.

See also
  VSOutputCompactPolicy.

Parameters

  policy | The policy to set.

## getVertexShaderOutputsCompactPolicy()

VSOutputCompactPolicy Ogre::RTShader::ShaderGenerator::getVertexShaderOutputsCompactPolicy | ( |  | ) | const

inline

Get the vertex shader outputs compaction policy.

See also
  VSOutputCompactPolicy.

## setCreateShaderOverProgrammablePass()

void Ogre::RTShader::ShaderGenerator::setCreateShaderOverProgrammablePass | ( | bool | value | ) |

inline

Sets whether shaders are created for passes with shaders.

Note that this only refers to when the system parses the materials itself. Not for when calling the createShaderBasedTechnique() function directly

Parameters

  value | The value to set this attribute pass.

## getCreateShaderOverProgrammablePass()

bool Ogre::RTShader::ShaderGenerator::getCreateShaderOverProgrammablePass | ( |  | ) | const

inline

Returns whether shaders are created for passes with shaders.

See also
  setCreateShaderOverProgrammablePass().

## getRTShaderSchemeCount()

size_t Ogre::RTShader::ShaderGenerator::getRTShaderSchemeCount | ( |  | ) | const

Returns the amount of schemes used in the for RT shader generation.

## getRTShaderScheme()

const String & Ogre::RTShader::ShaderGenerator::getRTShaderScheme | ( | size_t | index | ) | const

Returns the scheme name used in the for RT shader generation by index.

## setTargetLinearColours()

void Ogre::RTShader::ShaderGenerator::setTargetLinearColours | ( | bool | linear | ) |

inline

Set whether the shaders should target the linear colour space - e.g.

when rendering to a SRGB framebuffer.

## getTargetLinearColours()

bool Ogre::RTShader::ShaderGenerator::getTargetLinearColours | ( |  | ) | const

inline

## _markNonFFP()

void Ogre::RTShader::ShaderGenerator::_markNonFFP | ( | const TextureUnitState * | tu | ) |

static

mark the given texture unit as non-FFP

## Member Data Documentation

## DEFAULT_SCHEME_NAME

String Ogre::RTShader::ShaderGenerator::DEFAULT_SCHEME_NAME

static

same as MSN_SHADERGEN

The documentation for this class was generated from the following file:

- OgreShaderGenerator.h