OGRE-Next: Ogre::Technique Class Reference

| OGRE-Next 3.0.0 Object-Oriented Graphics Rendering Engine

Loading...
Searching...
No Matches
Classes | Public Types | Public Member Functions | List of all members
Ogre::Technique Class Reference
Core » Materials

Class representing an approach to rendering this particular Material. More...

`#include <OgreTechnique.h>`

Inheritance diagram for Ogre::Technique:
[legend]

## Classes
struct | GPUDeviceNameRule
| Rule controlling whether technique is deemed supported based on GPU device name. More...
struct | GPUVendorRule
| Rule controlling whether technique is deemed supported based on GPU vendor. More...

## Public Types
typedef ConstVectorIterator< GPUDeviceNameRuleList > | GPUDeviceNameRuleIterator
typedef vector< GPUDeviceNameRule >::type | GPUDeviceNameRuleList
typedef ConstVectorIterator< GPUVendorRuleList > | GPUVendorRuleIterator
typedef vector< GPUVendorRule >::type | GPUVendorRuleList
enum | IncludeOrExclude { INCLUDE = 0 , EXCLUDE = 1 }
| Directive used to manually control technique support based on the inclusion or exclusion of some factor. More...
typedef VectorIterator< Passes > | PassIterator

## Public Member Functions
| Technique (Material *parent)
| Constructor.
| Technique (Material *parent, const Technique &oth)
| Copy constructor.
| ~Technique ()
String | _compile (bool autoManageTextureUnits)
| Internal compilation method; see Material::compile.
unsigned short | _getSchemeIndex () const
| Internal method for getting the scheme index.
void | _load ()
| Internal load method, derived from call to Material::load.
void | _notifyNeedsRecompile ()
| Tells the technique that it needs recompilation.
void | _prepare ()
| Internal prepare method, derived from call to Material::prepare.
void | _unload ()
| Internal unload method, derived from call to Material::unload.
void | _unprepare ()
| Internal unprepare method, derived from call to Material::unprepare.
void | addGPUDeviceNameRule (const GPUDeviceNameRule &rule)
| Add a rule which manually influences the support for this technique based on a pattern that matches a GPU device name (e.g.
void | addGPUDeviceNameRule (const String &devicePattern, IncludeOrExclude includeOrExclude, bool caseSensitive=false)
| Add a rule which manually influences the support for this technique based on a pattern that matches a GPU device name (e.g.
void | addGPUVendorRule (const GPUVendorRule &rule)
| Add a rule which manually influences the support for this technique based on a GPU vendor.
void | addGPUVendorRule (GPUVendor vendor, IncludeOrExclude includeOrExclude)
| Add a rule which manually influences the support for this technique based on a GPU vendor.
bool | applyTextureAliases (const AliasTextureNamePairList &aliasList, const bool apply=true) const
| Applies texture names to Texture Unit State with matching texture name aliases.
size_t | calculateSize () const
bool | checkGPURules (StringStream &errors)
| Internal method for checking GPU vendor / device rules.
bool | checkHardwareSupport (bool autoManageTextureUnits, StringStream &compileErrors)
| Internal method for checking hardware support.
Pass * | createPass ()
| Creates a new Pass for this Technique.
GPUDeviceNameRuleIterator | getGPUDeviceNameRuleIterator () const
| Get an iterator over the currently registered device name rules.
GPUVendorRuleIterator | getGPUVendorRuleIterator () const
| Get an iterator over the currently registered vendor rules.
unsigned short | getLodIndex () const
| Gets the level-of-detail index assigned to this Technique.
const String & | getName () const
| Gets the name of the technique.
unsigned short | getNumPasses () const
| Retrieves the number of passes.
Material * | getParent () const
| Gets the parent Material.
Pass * | getPass (const String &name)
| Retrieves the Pass matching name.
Pass * | getPass (unsigned short index)
| Retrieves the Pass with the given index.
const PassIterator | getPassIterator ()
| Gets an iterator over the passes in this Technique.
const String & | getResourceGroup () const
| Gets the resource group of the ultimate parent Material.
const String & | getSchemeName () const
| Returns the scheme to which this technique is assigned.
Ogre::MaterialPtr | getShadowCasterMaterial () const
| return this material specific shadow casting specific material
UserObjectBindings & | getUserObjectBindings ()
| Return an instance of user objects binding associated with this class.
const UserObjectBindings & | getUserObjectBindings () const
| Return an instance of user objects binding associated with this class.
bool | hasColourWriteDisabled () const
| Exists colour writing disabled pass on this technique?
bool | isDepthCheckEnabled () const
| Is depth checking going to occur on this technique?
bool | isDepthWriteEnabled () const
| Is depth writing going to occur on this technique?
bool | isLoaded () const
| Is this loaded?
bool | isSupported () const
| Indicates if this technique is supported by the current graphics card.
bool | isTransparent () const
| Returns true if this Technique involves transparency.
bool | movePass (const unsigned short sourceIndex, const unsigned short destinationIndex)
| Move a pass from source index to destination index.
Technique & | operator= (const Technique &rhs)
| Overloaded operator to copy on Technique to another.
void | removeAllPasses ()
| Removes all Passes from this Technique.
void | removeGPUDeviceNameRule (const String &devicePattern)
| Removes a matching device name rule.
void | removeGPUVendorRule (GPUVendor vendor)
| Removes a matching vendor rule.
void | removePass (unsigned short index)
| Removes the Pass with the given index.
void | setAmbient (const ColourValue &ambient)
| Sets the ambient colour reflectance properties for every Pass in every Technique.
void | setAmbient (Real red, Real green, Real blue)
| Sets the ambient colour reflectance properties for every Pass in every Technique.
void | setBlendblock (const HlmsBlendblock &blendblock)
| Sets the blendblock every pass has with the existing contents of the scene.
void | setDiffuse (const ColourValue &diffuse)
| Sets the diffuse colour reflectance properties of every Pass in every Technique.
void | setDiffuse (Real red, Real green, Real blue, Real alpha)
| Sets the diffuse colour reflectance properties of every Pass in every Technique.
void | setFog (bool overrideScene, FogMode mode=FOG_NONE, const ColourValue &colour=ColourValue::White, Real expDensity=Real(0.001), Real linearStart=0.0, Real linearEnd=1.0)
| Sets the fogging mode applied to each pass.
void | setLodIndex (unsigned short index)
| Assigns a level-of-detail (LOD) index to this Technique.
void | setMacroblock (const HlmsMacroblock &macroblock)
| Sets the macroblock every pass has with the existing contents of the scene.
void | setName (const String &name)
| Set the name of the technique.
void | setPointSize (Real ps)
| Sets the point size properties for every Pass in this Technique.
void | setSamplerblock (const HlmsSamplerblock &samplerblock)
| Set samplerblock for every texture unit in every Pass.
void | setSchemeName (const String &schemeName)
| Set the 'scheme name' for this technique.
void | setSelfIllumination (const ColourValue &selfIllum)
| Sets the amount of self-illumination of every Pass in every Technique.
void | setSelfIllumination (Real red, Real green, Real blue)
| Sets the amount of self-illumination of every Pass in every Technique.
void | setShadingMode (ShadeOptions mode)
| Sets the type of light shading required.
void | setShadowCasterMaterial (const Ogre::String &name)
| set this material specific shadow casting specific material
void | setShadowCasterMaterial (Ogre::MaterialPtr val)
| set this material specific shadow casting specific material
void | setShininess (Real val)
| Sets the shininess properties of every Pass in every Technique.
void | setSpecular (const ColourValue &specular)
| Sets the specular colour reflectance properties of every Pass in every Technique.
void | setSpecular (Real red, Real green, Real blue, Real alpha)
| Sets the specular colour reflectance properties of every Pass in every Technique.

## Detailed Description

Class representing an approach to rendering this particular Material.

Remarks
  Ogre will attempt to use the best technique supported by the active hardware, unless you specifically request a lower detail technique (say for distant rendering).

## Member Typedef Documentation

## ◆ GPUDeviceNameRuleIterator

typedef ConstVectorIterator<GPUDeviceNameRuleList> Ogre::Technique::GPUDeviceNameRuleIterator

## ◆ GPUDeviceNameRuleList

typedef vector<GPUDeviceNameRule>::type Ogre::Technique::GPUDeviceNameRuleList

## ◆ GPUVendorRuleIterator

typedef ConstVectorIterator<GPUVendorRuleList> Ogre::Technique::GPUVendorRuleIterator

## ◆ GPUVendorRuleList

typedef vector<GPUVendorRule>::type Ogre::Technique::GPUVendorRuleList

## ◆ PassIterator

typedef VectorIterator<Passes> Ogre::Technique::PassIterator

## Member Enumeration Documentation

## ◆ IncludeOrExclude

enum Ogre::Technique::IncludeOrExclude

Directive used to manually control technique support based on the inclusion or exclusion of some factor.

Enumerator
INCLUDE | Inclusive - only support if present.
EXCLUDE | Exclusive - do not support if present.

## Constructor & Destructor Documentation

## ◆ Technique() [1/2]

Ogre::Technique::Technique | ( | Material * | parent | ) |

Constructor.

Referenced by Technique(), and operator=().

## ◆ Technique() [2/2]

Ogre::Technique::Technique | ( | Material * | parent,
|  | const Technique & | oth )

Copy constructor.

References Technique().

## ◆ ~Technique()

Ogre::Technique::~Technique | ( |  | ) |

## Member Function Documentation

## ◆ _compile()

String Ogre::Technique::_compile | ( | bool | autoManageTextureUnits | ) |

Internal compilation method; see Material::compile.

Returns
  Any information explaining problems with the compile.

## ◆ _getSchemeIndex()

unsigned short Ogre::Technique::_getSchemeIndex | ( |  | ) | const

Internal method for getting the scheme index.

## ◆ _load()

void Ogre::Technique::_load | ( |  | ) |

Internal load method, derived from call to Material::load.

## ◆ _notifyNeedsRecompile()

void Ogre::Technique::_notifyNeedsRecompile | ( |  | ) |

Tells the technique that it needs recompilation.

## ◆ _prepare()

void Ogre::Technique::_prepare | ( |  | ) |

Internal prepare method, derived from call to Material::prepare.

## ◆ _unload()

void Ogre::Technique::_unload | ( |  | ) |

Internal unload method, derived from call to Material::unload.

## ◆ _unprepare()

void Ogre::Technique::_unprepare | ( |  | ) |

Internal unprepare method, derived from call to Material::unprepare.

## ◆ addGPUDeviceNameRule() [1/2]

void Ogre::Technique::addGPUDeviceNameRule | ( | const GPUDeviceNameRule & | rule | ) |

Add a rule which manually influences the support for this technique based on a pattern that matches a GPU device name (e.g.

'8800').

Remarks
  You can use this facility to manually control whether a technique is considered supported, based on a GPU device name pattern. You can add inclusive or exclusive rules, and you can add as many of each as you like. If at least one inclusive rule is added, a technique is considered unsupported if it does not match any of those inclusive rules. If exclusive rules are added, the technique is considered unsupported if it matches any of those inclusive rules. The pattern you supply can include wildcard characters ('*') if you only want to match part of the device name.

Note
  Any rule for the same device pattern will be removed before adding this one.

## ◆ addGPUDeviceNameRule() [2/2]

void Ogre::Technique::addGPUDeviceNameRule | ( | const String & | devicePattern,
|  | IncludeOrExclude | includeOrExclude,
|  | bool | caseSensitive = false )

Add a rule which manually influences the support for this technique based on a pattern that matches a GPU device name (e.g.

'8800').

Remarks
  You can use this facility to manually control whether a technique is considered supported, based on a GPU device name pattern. You can add inclusive or exclusive rules, and you can add as many of each as you like. If at least one inclusive rule is added, a technique is considered unsupported if it does not match any of those inclusive rules. If exclusive rules are added, the technique is considered unsupported if it matches any of those inclusive rules. The pattern you supply can include wildcard characters ('*') if you only want to match part of the device name.

Note
  Any rule for the same device pattern will be removed before adding this one.

Parameters

  devicePattern | The GPU vendor
  includeOrExclude | Whether this is an inclusive or exclusive rule
  caseSensitive | Whether the match is case sensitive or not

## ◆ addGPUVendorRule() [1/2]

void Ogre::Technique::addGPUVendorRule | ( | const GPUVendorRule & | rule | ) |

Add a rule which manually influences the support for this technique based on a GPU vendor.

Remarks
  You can use this facility to manually control whether a technique is considered supported, based on a GPU vendor. You can add inclusive or exclusive rules, and you can add as many of each as you like. If at least one inclusive rule is added, a technique is considered unsupported if it does not match any of those inclusive rules. If exclusive rules are added, the technique is considered unsupported if it matches any of those inclusive rules.

Note
  Any rule for the same vendor will be removed before adding this one.

## ◆ addGPUVendorRule() [2/2]

void Ogre::Technique::addGPUVendorRule | ( | GPUVendor | vendor,
|  | IncludeOrExclude | includeOrExclude )

Add a rule which manually influences the support for this technique based on a GPU vendor.

Remarks
  You can use this facility to manually control whether a technique is considered supported, based on a GPU vendor. You can add inclusive or exclusive rules, and you can add as many of each as you like. If at least one inclusive rule is added, a technique is considered unsupported if it does not match any of those inclusive rules. If exclusive rules are added, the technique is considered unsupported if it matches any of those inclusive rules.

Note
  Any rule for the same vendor will be removed before adding this one.

Parameters

  vendor | The GPU vendor
  includeOrExclude | Whether this is an inclusive or exclusive rule

## ◆ applyTextureAliases()

bool Ogre::Technique::applyTextureAliases | ( | const AliasTextureNamePairList & | aliasList,
|  | const bool | apply = true ) const

Applies texture names to Texture Unit State with matching texture name aliases.

All passes, and Texture Unit States within the technique are checked. If matching texture aliases are found then true is returned.

Parameters

  aliasList | is a map container of texture alias, texture name pairs
  apply | set true to apply the texture aliases else just test to see if texture alias matches are found.

Returns
  True if matching texture aliases were found in the Technique.

## ◆ calculateSize()

size_t Ogre::Technique::calculateSize | ( |  | ) | const

## ◆ checkGPURules()

bool Ogre::Technique::checkGPURules | ( | StringStream & | errors | ) |

Internal method for checking GPU vendor / device rules.

## ◆ checkHardwareSupport()

bool Ogre::Technique::checkHardwareSupport | ( | bool | autoManageTextureUnits,
|  | StringStream & | compileErrors )

Internal method for checking hardware support.

## ◆ createPass()

Pass * Ogre::Technique::createPass | ( |  | ) |

Creates a new Pass for this Technique.

Remarks
  A Pass is a single rendering pass, i.e. a single draw of the given material. Note that if you create a pass without a fragment program, during compilation of the material the pass may be split into multiple passes if the graphics card cannot handle the number of texture units requested. For passes with fragment programs, however, the number of passes you create will never be altered, so you have to make sure that you create an alternative fallback Technique for if a card does not have enough facilities for what you're asking for.

## ◆ getGPUDeviceNameRuleIterator()

GPUDeviceNameRuleIterator Ogre::Technique::getGPUDeviceNameRuleIterator | ( |  | ) | const

Get an iterator over the currently registered device name rules.

## ◆ getGPUVendorRuleIterator()

GPUVendorRuleIterator Ogre::Technique::getGPUVendorRuleIterator | ( |  | ) | const

Get an iterator over the currently registered vendor rules.

## ◆ getLodIndex()

unsigned short Ogre::Technique::getLodIndex | ( |  | ) | const
| inline

Gets the level-of-detail index assigned to this Technique.

References getLodIndex().

Referenced by getLodIndex().

## ◆ getName()

const String & Ogre::Technique::getName | ( |  | ) | const
| inline

Gets the name of the technique.

## ◆ getNumPasses()

unsigned short Ogre::Technique::getNumPasses | ( |  | ) | const

Retrieves the number of passes.

## ◆ getParent()

Material * Ogre::Technique::getParent | ( |  | ) | const
| inline

Gets the parent Material.

## ◆ getPass() [1/2]

Pass * Ogre::Technique::getPass | ( | const String & | name | ) |

Retrieves the Pass matching name.

Returns 0 if name match is not found.

## ◆ getPass() [2/2]

Pass * Ogre::Technique::getPass | ( | unsigned short | index | ) |

Retrieves the Pass with the given index.

## ◆ getPassIterator()

const PassIterator Ogre::Technique::getPassIterator | ( |  | ) |

Gets an iterator over the passes in this Technique.

## ◆ getResourceGroup()

const String & Ogre::Technique::getResourceGroup | ( |  | ) | const

Gets the resource group of the ultimate parent Material.

## ◆ getSchemeName()

const String & Ogre::Technique::getSchemeName | ( |  | ) | const

Returns the scheme to which this technique is assigned.

See also
  Technique::setSchemeName

## ◆ getShadowCasterMaterial()

Ogre::MaterialPtr Ogre::Technique::getShadowCasterMaterial | ( |  | ) | const

return this material specific shadow casting specific material

## ◆ getUserObjectBindings() [1/2]

UserObjectBindings & Ogre::Technique::getUserObjectBindings | ( |  | ) |
| inline

Return an instance of user objects binding associated with this class.

You can use it to associate one or more custom objects with this class instance.

See also
  UserObjectBindings::setUserAny.

## ◆ getUserObjectBindings() [2/2]

const UserObjectBindings & Ogre::Technique::getUserObjectBindings | ( |  | ) | const
| inline

Return an instance of user objects binding associated with this class.

You can use it to associate one or more custom objects with this class instance.

See also
  UserObjectBindings::setUserAny.

## ◆ hasColourWriteDisabled()

bool Ogre::Technique::hasColourWriteDisabled | ( |  | ) | const

Exists colour writing disabled pass on this technique?

## ◆ isDepthCheckEnabled()

bool Ogre::Technique::isDepthCheckEnabled | ( |  | ) | const

Is depth checking going to occur on this technique?

## ◆ isDepthWriteEnabled()

bool Ogre::Technique::isDepthWriteEnabled | ( |  | ) | const

Is depth writing going to occur on this technique?

## ◆ isLoaded()

bool Ogre::Technique::isLoaded | ( |  | ) | const

Is this loaded?

## ◆ isSupported()

bool Ogre::Technique::isSupported | ( |  | ) | const

Indicates if this technique is supported by the current graphics card.

Remarks
  This will only be correct after the Technique has been compiled, which is usually done from Material::compile.

## ◆ isTransparent()

bool Ogre::Technique::isTransparent | ( |  | ) | const

Returns true if this Technique involves transparency.

Remarks
  This basically boils down to whether the first pass has a scene blending factor. Even if the other passes do not, the base colour, including parts of the original scene, may be used for blending, therefore we have to treat the whole Technique as transparent.

## ◆ movePass()

bool Ogre::Technique::movePass | ( | const unsigned short | sourceIndex,
|  | const unsigned short | destinationIndex )

Move a pass from source index to destination index.

If successful then returns true.

## ◆ operator=()

Technique & Ogre::Technique::operator= | ( | const Technique & | rhs | ) |

Overloaded operator to copy on Technique to another.

References Technique().

## ◆ removeAllPasses()

void Ogre::Technique::removeAllPasses | ( |  | ) |

Removes all Passes from this Technique.

## ◆ removeGPUDeviceNameRule()

void Ogre::Technique::removeGPUDeviceNameRule | ( | const String & | devicePattern | ) |

Removes a matching device name rule.

See also
  addGPUDeviceNameRule

## ◆ removeGPUVendorRule()

void Ogre::Technique::removeGPUVendorRule | ( | GPUVendor | vendor | ) |

Removes a matching vendor rule.

See also
  addGPUVendorRule

## ◆ removePass()

void Ogre::Technique::removePass | ( | unsigned short | index | ) |

Removes the Pass with the given index.

## ◆ setAmbient() [1/2]

void Ogre::Technique::setAmbient | ( | const ColourValue & | ambient | ) |

Sets the ambient colour reflectance properties for every Pass in every Technique.

Note
  This property actually exists on the Pass class. For simplicity, this method allows you to set these properties for every current Pass within this Technique. If you need more precision, retrieve the Pass instance and set the property there.

See also
  Pass::setAmbient

## ◆ setAmbient() [2/2]

void Ogre::Technique::setAmbient | ( | Real | red,
|  | Real | green,
|  | Real | blue )

Sets the ambient colour reflectance properties for every Pass in every Technique.

Note
  This property actually exists on the Pass class. For simplicity, this method allows you to set these properties for every current Pass within this Technique. If you need more precision, retrieve the Pass instance and set the property there.

See also
  Pass::setAmbient

## ◆ setBlendblock()

void Ogre::Technique::setBlendblock | ( | const HlmsBlendblock & | blendblock | ) |

Sets the blendblock every pass has with the existing contents of the scene.

Note
  This property actually exists on the Pass class. For simplicity, this method allows you to set these properties for every current Pass within this Technique. If you need more precision, retrieve the Pass instance and set the property there.

See also
  Pass::setBlendblock

References setBlendblock().

Referenced by setBlendblock().

## ◆ setDiffuse() [1/2]

void Ogre::Technique::setDiffuse | ( | const ColourValue & | diffuse | ) |

Sets the diffuse colour reflectance properties of every Pass in every Technique.

Note
  This property actually exists on the Pass class. For simplicity, this method allows you to set these properties for every current Pass within this Technique. If you need more precision, retrieve the Pass instance and set the property there.

See also
  Pass::setDiffuse

## ◆ setDiffuse() [2/2]

void Ogre::Technique::setDiffuse | ( | Real | red,
|  | Real | green,
|  | Real | blue,
|  | Real | alpha )

Sets the diffuse colour reflectance properties of every Pass in every Technique.

Note
  This property actually exists on the Pass class. For simplicity, this method allows you to set these properties for every current Pass within this Technique. If you need more precision, retrieve the Pass instance and set the property there.

See also
  Pass::setDiffuse

## ◆ setFog()

void Ogre::Technique::setFog | ( | bool | overrideScene,
|  | FogMode | mode = FOG_NONE,
|  | const ColourValue & | colour = ColourValue::White,
|  | Real | expDensity = Real(0.001),
|  | Real | linearStart = 0.0,
|  | Real | linearEnd = 1.0 )

Sets the fogging mode applied to each pass.

Note
  This property actually exists on the Pass class. For simplicity, this method allows you to set these properties for every current Pass within this Technique. If you need more precision, retrieve the Pass instance and set the property there.

See also
  Pass::setFog

References Ogre::FOG_NONE, and setFog().

Referenced by setFog().

## ◆ setLodIndex()

void Ogre::Technique::setLodIndex | ( | unsigned short | index | ) |

Assigns a level-of-detail (LOD) index to this Technique.

Remarks
  As noted previously, as well as providing fallback support for various graphics cards, multiple Technique objects can also be used to implement material LOD, where the detail of the material diminishes with distance to save rendering power.

  By default, all Techniques have a LOD index of 0, which means they are the highest level of detail. Increasing LOD indexes are lower levels of detail. You can assign more than one Technique to the same LOD index, meaning that the best Technique that is supported at that LOD index is used.

  You should not leave gaps in the LOD sequence; Ogre will allow you to do this and will continue to function as if the LODs were sequential, but it will confuse matters.

References setLodIndex().

Referenced by setLodIndex().

## ◆ setMacroblock()

void Ogre::Technique::setMacroblock | ( | const HlmsMacroblock & | macroblock | ) |

Sets the macroblock every pass has with the existing contents of the scene.

Note
  This property actually exists on the Pass class. For simplicity, this method allows you to set these properties for every current Pass within this Technique. If you need more precision, retrieve the Pass instance and set the property there.

See also
  Pass::setBlendblock

References setMacroblock().

Referenced by setMacroblock().

## ◆ setName()

void Ogre::Technique::setName | ( | const String & | name | ) |

Set the name of the technique.

Remarks
  The use of technique name is optional. Its useful in material scripts where a material could inherit from another material and only want to modify a particular technique.

## ◆ setPointSize()

void Ogre::Technique::setPointSize | ( | Real | ps | ) |

Sets the point size properties for every Pass in this Technique.

Note
  This property actually exists on the Pass class. For simplicity, this method allows you to set these properties for every current Pass within this Technique. If you need more precision, retrieve the Pass instance and set the property there.

See also
  Pass::setPointSize

## ◆ setSamplerblock()

void Ogre::Technique::setSamplerblock | ( | const HlmsSamplerblock & | samplerblock | ) |

Set samplerblock for every texture unit in every Pass.

Note
  This property actually exists on the TextureUnitState class For simplicity, this method allows you to set these properties for every current TeextureUnitState, If you need more precision, retrieve the Pass and TextureUnitState instances and set the property there.

See also
  TextureUnitState::setSamplerblock

References setSamplerblock().

Referenced by setSamplerblock().

## ◆ setSchemeName()

void Ogre::Technique::setSchemeName | ( | const String & | schemeName | ) |

Set the 'scheme name' for this technique.

Remarks
  Material schemes are used to control top-level switching from one set of techniques to another. For example, you might use this to define 'high', 'medium' and 'low' complexity levels on materials to allow a user to pick a performance / quality ratio. Another possibility is that you have a fully HDR-enabled pipeline for top machines, rendering all objects using unclamped shaders, and a simpler pipeline for others; this can be implemented using schemes.

  Every technique belongs to a scheme - if you don't specify one, the Technique belongs to the scheme called 'Default', which is also the scheme used to render by default. The active scheme is set one of two ways - either by calling Viewport::setMaterialScheme, or by manually calling MaterialManager::setActiveScheme.

## ◆ setSelfIllumination() [1/2]

void Ogre::Technique::setSelfIllumination | ( | const ColourValue & | selfIllum | ) |

Sets the amount of self-illumination of every Pass in every Technique.

Note
  This property actually exists on the Pass class. For simplicity, this method allows you to set these properties for every current Pass within this Technique. If you need more precision, retrieve the Pass instance and set the property there.

See also
  Pass::setSelfIllumination

## ◆ setSelfIllumination() [2/2]

void Ogre::Technique::setSelfIllumination | ( | Real | red,
|  | Real | green,
|  | Real | blue )

Sets the amount of self-illumination of every Pass in every Technique.

Note
  This property actually exists on the Pass class. For simplicity, this method allows you to set these properties for every current Pass within this Technique. If you need more precision, retrieve the Pass instance and set the property there.

See also
  Pass::setSelfIllumination

## ◆ setShadingMode()

void Ogre::Technique::setShadingMode | ( | ShadeOptions | mode | ) |

Sets the type of light shading required.

Note
  This property actually exists on the Pass class. For simplicity, this method allows you to set these properties for every current Pass within this Technique. If you need more precision, retrieve the Pass instance and set the property there.

See also
  Pass::setShadingMode

## ◆ setShadowCasterMaterial() [1/2]

void Ogre::Technique::setShadowCasterMaterial | ( | const Ogre::String & | name | ) |

set this material specific shadow casting specific material

## ◆ setShadowCasterMaterial() [2/2]

void Ogre::Technique::setShadowCasterMaterial | ( | Ogre::MaterialPtr | val | ) |

set this material specific shadow casting specific material

## ◆ setShininess()

void Ogre::Technique::setShininess | ( | Real | val | ) |

Sets the shininess properties of every Pass in every Technique.

Note
  This property actually exists on the Pass class. For simplicity, this method allows you to set these properties for every current Pass within this Technique. If you need more precision, retrieve the Pass instance and set the property there.

See also
  Pass::setShininess

## ◆ setSpecular() [1/2]

void Ogre::Technique::setSpecular | ( | const ColourValue & | specular | ) |

Sets the specular colour reflectance properties of every Pass in every Technique.

Note
  This property actually exists on the Pass class. For simplicity, this method allows you to set these properties for every current Pass within this Technique. If you need more precision, retrieve the Pass instance and set the property there.

See also
  Pass::setSpecular

## ◆ setSpecular() [2/2]

void Ogre::Technique::setSpecular | ( | Real | red,
|  | Real | green,
|  | Real | blue,
|  | Real | alpha )

Sets the specular colour reflectance properties of every Pass in every Technique.

Note
  This property actually exists on the Pass class. For simplicity, this method allows you to set these properties for every current Pass within this Technique. If you need more precision, retrieve the Pass instance and set the property there.

See also
  Pass::setSpecular

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

- OgreTechnique.h