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
typedef VectorIterator< IlluminationPassList > | IlluminationPassIterator
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. More...
| Technique (Material *parent, const Technique &oth)
| Copy constructor. More...
| ~Technique ()
String | _compile (bool autoManageTextureUnits)
| Internal compilation method; see Material::compile. More...
void | _compileIlluminationPasses (void)
| Internal method for splitting the passes into illumination passes. More...
unsigned short | _getSchemeIndex (void) const
| Internal method for getting the scheme index. More...
void | _load (void)
| Internal load method, derived from call to Material::load. More...
void | _notifyNeedsRecompile (void)
| Tells the technique that it needs recompilation. More...
void | _prepare (void)
| Internal prepare method, derived from call to Material::prepare. More...
void | _unload (void)
| Internal unload method, derived from call to Material::unload. More...
void | _unprepare (void)
| Internal unprepare method, derived from call to Material::unprepare. More...
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. More...
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. More...
void | addGPUVendorRule (GPUVendor vendor, IncludeOrExclude includeOrExclude)
| Add a rule which manually influences the support for this technique based on a GPU vendor. More...
void | addGPUVendorRule (const GPUVendorRule &rule)
| Add a rule which manually influences the support for this technique based on a GPU vendor. More...
bool | applyTextureAliases (const AliasTextureNamePairList &aliasList, const bool apply=true) const
| Applies texture names to Texture Unit State with matching texture name aliases. More...
size_t | calculateSize (void) const
bool | checkGPURules (StringUtil::StrStreamType &errors)
| Internal method for checking GPU vendor / device rules. More...
bool | checkHardwareSupport (bool autoManageTextureUnits, StringUtil::StrStreamType &compileErrors)
| Internal method for checking hardware support. More...
Pass * | createPass (void)
| Creates a new Pass for this Technique. More...
GPUDeviceNameRuleIterator | getGPUDeviceNameRuleIterator () const
| Get an iterator over the currently registered device name rules. More...
GPUVendorRuleIterator | getGPUVendorRuleIterator () const
| Get an iterator over the currently registered vendor rules. More...
const IlluminationPassIterator | getIlluminationPassIterator (void)
| Gets an iterator over the illumination-stage categorised passes. More...
unsigned short | getLodIndex (void) const
| Gets the level-of-detail index assigned to this Technique. More...
const String & | getName (void) const
| Gets the name of the technique. More...
unsigned short | getNumPasses (void) const
| Retrieves the number of passes. More...
Material * | getParent (void) const
| Gets the parent Material. More...
Pass * | getPass (unsigned short index)
| Retrieves the Pass with the given index. More...
Pass * | getPass (const String &name)
| Retrieves the Pass matching name. More...
const PassIterator | getPassIterator (void)
| Gets an iterator over the passes in this Technique. More...
const String & | getResourceGroup (void) const
| Gets the resource group of the ultimate parent Material. More...
const String & | getSchemeName (void) const
| Returns the scheme to which this technique is assigned. More...
Ogre::MaterialPtr | getShadowCasterMaterial () const
| return this material specific shadow casting specific material More...
Ogre::MaterialPtr | getShadowReceiverMaterial () const
| return this material specific shadow receiving specific material More...
UserObjectBindings & | getUserObjectBindings ()
| Return an instance of user objects binding associated with this class. More...
const UserObjectBindings & | getUserObjectBindings () const
| Return an instance of user objects binding associated with this class. More...
bool | hasColourWriteDisabled (void) const
| Exists colour writing disabled pass on this technique? More...
bool | isDepthCheckEnabled (void) const
| Is depth checking going to occur on this technique? More...
bool | isDepthWriteEnabled (void) const
| Is depth writing going to occur on this technique? More...
bool | isLoaded (void) const
| Is this loaded? More...
bool | isSupported (void) const
| Indicates if this technique is supported by the current graphics card. More...
bool | isTransparent (void) const
| Returns true if this Technique involves transparency. More...
bool | isTransparentSortingEnabled (void) const
| Returns true if this Technique has transparent sorting enabled. More...
bool | isTransparentSortingForced (void) const
| Returns true if this Technique has transparent sorting forced. More...
bool | movePass (const unsigned short sourceIndex, const unsigned short destinationIndex)
| Move a pass from source index to destination index. More...
void | operator delete (void *ptr)
void | operator delete (void *ptr, void *)
void | operator delete (void *ptr, const char *, int, const char *)
void | operator delete[] (void *ptr)
void | operator delete[] (void *ptr, const char *, int, const char *)
void * | operator new (size_t sz, const char *file, int line, const char *func)
| operator new, with debug line info More...
void * | operator new (size_t sz)
void * | operator new (size_t sz, void *ptr)
| placement operator new More...
void * | operator new[] (size_t sz, const char *file, int line, const char *func)
| array operator new, with debug line info More...
void * | operator new[] (size_t sz)
Technique & | operator= (const Technique &rhs)
| Overloaded operator to copy on Technique to another. More...
void | removeAllPasses (void)
| Removes all Passes from this Technique. More...
void | removeGPUDeviceNameRule (const String &devicePattern)
| Removes a matching device name rule. More...
void | removeGPUVendorRule (GPUVendor vendor)
| Removes a matching vendor rule. More...
void | removePass (unsigned short index)
| Removes the Pass with the given index. More...
void | setAmbient (Real red, Real green, Real blue)
| Sets the ambient colour reflectance properties for every Pass in every Technique. More...
void | setAmbient (const ColourValue &ambient)
| Sets the ambient colour reflectance properties for every Pass in every Technique. More...
void | setColourWriteEnabled (bool enabled)
| Sets whether or not colour buffer writing is enabled for each Pass. More...
void | setCullingMode (CullingMode mode)
| Sets the culling mode for each pass based on the 'vertex winding'. More...
void | setDepthBias (float constantBias, float slopeScaleBias)
| Sets the depth bias to be used for each Pass. More...
void | setDepthCheckEnabled (bool enabled)
| Sets whether or not each Pass renders with depth-buffer checking on or not. More...
void | setDepthFunction (CompareFunction func)
| Sets the function used to compare depth values when depth checking is on. More...
void | setDepthWriteEnabled (bool enabled)
| Sets whether or not each Pass renders with depth-buffer writing on or not. More...
void | setDiffuse (Real red, Real green, Real blue, Real alpha)
| Sets the diffuse colour reflectance properties of every Pass in every Technique. More...
void | setDiffuse (const ColourValue &diffuse)
| Sets the diffuse colour reflectance properties of every Pass in every Technique. More...
void | setFog (bool overrideScene, FogMode mode=FOG_NONE, const ColourValue &colour=ColourValue::White, Real expDensity=0.001, Real linearStart=0.0, Real linearEnd=1.0)
| Sets the fogging mode applied to each pass. More...
void | setLightingEnabled (bool enabled)
| Sets whether or not dynamic lighting is enabled for every Pass. More...
void | setLodIndex (unsigned short index)
| Assigns a level-of-detail (LOD) index to this Technique. More...
void | setManualCullingMode (ManualCullingMode mode)
| Sets the manual culling mode, performed by CPU rather than hardware. More...
void | setName (const String &name)
| Set the name of the technique. More...
void | setPointSize (Real ps)
| Sets the point size properties for every Pass in this Technique. More...
void | setSceneBlending (const SceneBlendType sbt)
| Sets the kind of blending every pass has with the existing contents of the scene. More...
void | setSceneBlending (const SceneBlendFactor sourceFactor, const SceneBlendFactor destFactor)
| Allows very fine control of blending every Pass with the existing contents of the scene. More...
void | setSchemeName (const String &schemeName)
| Set the 'scheme name' for this technique. More...
void | setSelfIllumination (Real red, Real green, Real blue)
| Sets the amount of self-illumination of every Pass in every Technique. More...
void | setSelfIllumination (const ColourValue &selfIllum)
| Sets the amount of self-illumination of every Pass in every Technique. More...
void | setSeparateSceneBlending (const SceneBlendType sbt, const SceneBlendType sbta)
| Sets the kind of blending every pass has with the existing contents of the scene, using individual factors both color and alpha channels. More...
void | setSeparateSceneBlending (const SceneBlendFactor sourceFactor, const SceneBlendFactor destFactor, const SceneBlendFactor sourceFactorAlpha, const SceneBlendFactor destFactorAlpha)
| Allows very fine control of blending every Pass with the existing contents of the scene, using individual factors both color and alpha channels. More...
void | setShadingMode (ShadeOptions mode)
| Sets the type of light shading required. More...
void | setShadowCasterMaterial (Ogre::MaterialPtr val)
| set this material specific shadow casting specific material More...
void | setShadowCasterMaterial (const Ogre::String &name)
| set this material specific shadow casting specific material More...
void | setShadowReceiverMaterial (Ogre::MaterialPtr val)
| set this material specific shadow receiving specific material More...
void | setShadowReceiverMaterial (const Ogre::String &name)
| set this material specific shadow receiving specific material More...
void | setShininess (Real val)
| Sets the shininess properties of every Pass in every Technique. More...
void | setSpecular (Real red, Real green, Real blue, Real alpha)
| Sets the specular colour reflectance properties of every Pass in every Technique. More...
void | setSpecular (const ColourValue &specular)
| Sets the specular colour reflectance properties of every Pass in every Technique. More...
void | setTextureAnisotropy (unsigned int maxAniso)
| Sets the anisotropy level to be used for all textures. More...
void | setTextureFiltering (TextureFilterOptions filterType)
| Set texture filtering for every texture unit in every Pass. More...

## Protected Types

enum | IlluminationPassesState { IPS_COMPILE_DISABLED = -1, IPS_NOT_COMPILED = 0, IPS_COMPILED = 1 }
| Illumination pass state type. More...
typedef vector< Pass * >::type | Passes

## Protected Member Functions

bool | checkManuallyOrganisedIlluminationPasses ()
| Internal method - check for manually assigned illumination passes. More...
void | clearIlluminationPasses (void)
| Internal method for clearing illumination pass list. More...

## Protected Attributes

GPUDeviceNameRuleList | mGPUDeviceNameRules
GPUVendorRuleList | mGPUVendorRules
IlluminationPassList | mIlluminationPasses
| List of derived passes, categorised into IlluminationStage (ordered) More...
IlluminationPassesState | mIlluminationPassesCompilationPhase
bool | mIsSupported
unsigned short | mLodIndex
| LOD level. More...
String | mName
| Optional name for the technique. More...
Material * | mParent
Passes | mPasses
| List of primary passes. More...
unsigned short | mSchemeIndex
| Scheme index, derived from scheme name but the names are held on MaterialManager, for speed an index is used here. More...
MaterialPtr | mShadowCasterMaterial
| When casting shadow, if not using default Ogre shadow casting material, or nor using fixed function casting, mShadowCasterMaterial let you customize per material shadow caster behavior. More...
String | mShadowCasterMaterialName
| When casting shadow, if not using default Ogre shadow casting material, or nor using fixed function casting, mShadowCasterMaterial let you customize per material shadow caster behavior.There only material name is stored so that it can be loaded once all file parsed in a resource group. More...
MaterialPtr | mShadowReceiverMaterial
| When receiving shadow, if not using default Ogre shadow receiving material, or nor using fixed function texture projection receiving, mShadowReceiverMaterial let you customize per material shadow caster behavior. More...
String | mShadowReceiverMaterialName
| When receiving shadow, if not using default Ogre shadow receiving material, or nor using fixed function texture projection receiving, mShadowReceiverMaterial let you customize per material shadow caster behavior. More...
UserObjectBindings | mUserObjectBindings

## 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).

Definition at line 53 of file OgreTechnique.h.

## Member Typedef Documentation

## GPUDeviceNameRuleIterator

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

Definition at line 694 of file OgreTechnique.h.

## GPUDeviceNameRuleList

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

Definition at line 145 of file OgreTechnique.h.

## GPUVendorRuleIterator

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

Definition at line 653 of file OgreTechnique.h.

## GPUVendorRuleList

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

Definition at line 144 of file OgreTechnique.h.

## IlluminationPassIterator

typedef VectorIterator<IlluminationPassList> Ogre::Technique::IlluminationPassIterator

Definition at line 203 of file OgreTechnique.h.

## Passes

typedef vector<Pass*>::type Ogre::Technique::Passes

protected

Definition at line 64 of file OgreTechnique.h.

## PassIterator

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

Definition at line 200 of file OgreTechnique.h.

## Member Enumeration Documentation

## IlluminationPassesState

enum Ogre::Technique::IlluminationPassesState

protected

Illumination pass state type.

Enumerator
IPS_COMPILE_DISABLED |
IPS_NOT_COMPILED |
IPS_COMPILED |

Definition at line 57 of file OgreTechnique.h.

## 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.

Definition at line 116 of file OgreTechnique.h.

## Constructor & Destructor Documentation

## Technique() [1/2]

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

Constructor.

## Technique() [2/2]

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

Copy constructor.

## ~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.

## _compileIlluminationPasses()

void Ogre::Technique::_compileIlluminationPasses | ( | void |  | ) |

Internal method for splitting the passes into illumination passes.

## _getSchemeIndex()

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

Internal method for getting the scheme index.

## _load()

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

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

## _notifyNeedsRecompile()

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

Tells the technique that it needs recompilation.

## _prepare()

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

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

## _unload()

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

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

## _unprepare()

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

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

## addGPUDeviceNameRule() [1/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

## addGPUDeviceNameRule() [2/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.

## addGPUVendorRule() [1/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

## addGPUVendorRule() [2/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.

## 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 | ( | void |  | ) | const

## checkGPURules()

bool Ogre::Technique::checkGPURules | ( | StringUtil::StrStreamType & | errors | ) |

Internal method for checking GPU vendor / device rules.

## checkHardwareSupport()

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

Internal method for checking hardware support.

## checkManuallyOrganisedIlluminationPasses()

bool Ogre::Technique::checkManuallyOrganisedIlluminationPasses | ( |  | ) |

protected

Internal method - check for manually assigned illumination passes.

## clearIlluminationPasses()

void Ogre::Technique::clearIlluminationPasses | ( | void |  | ) |

protected

Internal method for clearing illumination pass list.

## createPass()

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

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.

## getIlluminationPassIterator()

const IlluminationPassIterator Ogre::Technique::getIlluminationPassIterator | ( | void |  | ) |

Gets an iterator over the illumination-stage categorised passes.

## getLodIndex()

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

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

Definition at line 559 of file OgreTechnique.h.

## getName()

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

Gets the name of the technique.

Definition at line 603 of file OgreTechnique.h.

## getNumPasses()

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

Retrieves the number of passes.

## getParent()

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

Gets the parent Material.

Definition at line 207 of file OgreTechnique.h.

References Ogre::FOG_NONE, and Ogre::ColourValue::White.

## getPass() [1/2]

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

Retrieves the Pass with the given index.

## getPass() [2/2]

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

Retrieves the Pass matching name.

Returns 0 if name match is not found.

## getPassIterator()

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

Gets an iterator over the passes in this Technique.

## getResourceGroup()

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

Gets the resource group of the ultimate parent Material.

## getSchemeName()

const String& Ogre::Technique::getSchemeName | ( | void |  | ) | 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

## getShadowReceiverMaterial()

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

return this material specific shadow receiving specific material

## getUserObjectBindings() [1/2]

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

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.

Definition at line 702 of file OgreTechnique.h.

## getUserObjectBindings() [2/2]

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

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.

Definition at line 708 of file OgreTechnique.h.

## hasColourWriteDisabled()

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

Exists colour writing disabled pass on this technique?

## isDepthCheckEnabled()

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

Is depth checking going to occur on this technique?

## isDepthWriteEnabled()

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

Is depth writing going to occur on this technique?

## isLoaded()

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

Is this loaded?

## isSupported()

bool Ogre::Technique::isSupported | ( | void |  | ) | 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 | ( | void |  | ) | 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.

## isTransparentSortingEnabled()

bool Ogre::Technique::isTransparentSortingEnabled | ( | void |  | ) | const

Returns true if this Technique has transparent sorting enabled.

Remarks
  This basically boils down to whether the first pass has transparent sorting enabled or not

## isTransparentSortingForced()

bool Ogre::Technique::isTransparentSortingForced | ( | void |  | ) | const

Returns true if this Technique has transparent sorting forced.

Remarks
  This basically boils down to whether the first pass has transparent sorting forced or not

## 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 delete() [1/3]

template<class Alloc >

void Ogre::AllocatedObject< Alloc >::operator delete | ( | void * | ptr | ) |

inherited

Definition at line 96 of file OgreMemoryAllocatedObject.h.

## operator delete() [2/3]

template<class Alloc >

void Ogre::AllocatedObject< Alloc >::operator delete | ( | void * | ptr,
|  | void * |
| ) |  |

inherited

Definition at line 102 of file OgreMemoryAllocatedObject.h.

## operator delete() [3/3]

template<class Alloc >

void Ogre::AllocatedObject< Alloc >::operator delete | ( | void * | ptr,
|  | const char * | ,
|  | int | ,
|  | const char * |
| ) |  |

inherited

Definition at line 108 of file OgreMemoryAllocatedObject.h.

## operator delete[]() [1/2]

template<class Alloc >

void Ogre::AllocatedObject< Alloc >::operator delete[] | ( | void * | ptr | ) |

inherited

Definition at line 113 of file OgreMemoryAllocatedObject.h.

## operator delete[]() [2/2]

template<class Alloc >

void Ogre::AllocatedObject< Alloc >::operator delete[] | ( | void * | ptr,
|  | const char * | ,
|  | int | ,
|  | const char * |
| ) |  |

inherited

Definition at line 119 of file OgreMemoryAllocatedObject.h.

## operator new() [1/3]

template<class Alloc >

void* Ogre::AllocatedObject< Alloc >::operator new | ( | size_t | sz,
|  | const char * | file,
|  | int | line,
|  | const char * | func
| ) |  |

inherited

operator new, with debug line info

Definition at line 68 of file OgreMemoryAllocatedObject.h.

## operator new() [2/3]

template<class Alloc >

void* Ogre::AllocatedObject< Alloc >::operator new | ( | size_t | sz | ) |

inherited

Definition at line 73 of file OgreMemoryAllocatedObject.h.

## operator new() [3/3]

template<class Alloc >

void* Ogre::AllocatedObject< Alloc >::operator new | ( | size_t | sz,
|  | void * | ptr
| ) |  |

inherited

placement operator new

Definition at line 79 of file OgreMemoryAllocatedObject.h.

## operator new[]() [1/2]

template<class Alloc >

void* Ogre::AllocatedObject< Alloc >::operator new[] | ( | size_t | sz,
|  | const char * | file,
|  | int | line,
|  | const char * | func
| ) |  |

inherited

array operator new, with debug line info

Definition at line 86 of file OgreMemoryAllocatedObject.h.

## operator new[]() [2/2]

template<class Alloc >

void* Ogre::AllocatedObject< Alloc >::operator new[] | ( | size_t | sz | ) |

inherited

Definition at line 91 of file OgreMemoryAllocatedObject.h.

## operator=()

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

Overloaded operator to copy on Technique to another.

## removeAllPasses()

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

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 | ( | 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

## setAmbient() [2/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

## setColourWriteEnabled()

void Ogre::Technique::setColourWriteEnabled | ( | bool | enabled | ) |

Sets whether or not colour buffer writing is enabled for 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::setColourWriteEnabled

## setCullingMode()

void Ogre::Technique::setCullingMode | ( | CullingMode | mode | ) |

Sets the culling mode for each pass based on the 'vertex winding'.

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::setCullingMode

## setDepthBias()

void Ogre::Technique::setDepthBias | ( | float | constantBias,
|  | float | slopeScaleBias
| ) |  |

Sets the depth bias to be used for 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::setDepthBias

## setDepthCheckEnabled()

void Ogre::Technique::setDepthCheckEnabled | ( | bool | enabled | ) |

Sets whether or not each Pass renders with depth-buffer checking on or not.

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::setDepthCheckEnabled

## setDepthFunction()

void Ogre::Technique::setDepthFunction | ( | CompareFunction | func | ) |

Sets the function used to compare depth values when depth checking is on.

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::setDepthFunction

## setDepthWriteEnabled()

void Ogre::Technique::setDepthWriteEnabled | ( | bool | enabled | ) |

Sets whether or not each Pass renders with depth-buffer writing on or not.

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::setDepthWriteEnabled

## setDiffuse() [1/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

## setDiffuse() [2/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

## setFog()

void Ogre::Technique::setFog | ( | bool | overrideScene,
|  | FogMode | mode = `FOG_NONE`,
|  | const ColourValue & | colour = `ColourValue::White`,
|  | Real | expDensity = `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

## setLightingEnabled()

void Ogre::Technique::setLightingEnabled | ( | bool | enabled | ) |

Sets whether or not dynamic lighting is enabled for every 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::setLightingEnabled

## 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.

## setManualCullingMode()

void Ogre::Technique::setManualCullingMode | ( | ManualCullingMode | mode | ) |

Sets the manual culling mode, performed by CPU rather than hardware.

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::setManualCullingMode

## 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

## setSceneBlending() [1/2]

void Ogre::Technique::setSceneBlending | ( | const SceneBlendType | sbt | ) |

Sets the kind of blending 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::setSceneBlending

## setSceneBlending() [2/2]

void Ogre::Technique::setSceneBlending | ( | const SceneBlendFactor | sourceFactor,
|  | const SceneBlendFactor | destFactor
| ) |  |

Allows very fine control of blending every Pass 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::setSceneBlending

## 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 | ( | 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

## setSelfIllumination() [2/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

## setSeparateSceneBlending() [1/2]

void Ogre::Technique::setSeparateSceneBlending | ( | const SceneBlendType | sbt,
|  | const SceneBlendType | sbta
| ) |  |

Sets the kind of blending every pass has with the existing contents of the scene, using individual factors both color and alpha channels.

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::setSeparateSceneBlending

## setSeparateSceneBlending() [2/2]

void Ogre::Technique::setSeparateSceneBlending | ( | const SceneBlendFactor | sourceFactor,
|  | const SceneBlendFactor | destFactor,
|  | const SceneBlendFactor | sourceFactorAlpha,
|  | const SceneBlendFactor | destFactorAlpha
| ) |  |

Allows very fine control of blending every Pass with the existing contents of the scene, using individual factors both color and alpha channels.

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::setSeparateSceneBlending

## 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 | ( | Ogre::MaterialPtr | val | ) |

set this material specific shadow casting specific material

## setShadowCasterMaterial() [2/2]

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

set this material specific shadow casting specific material

## setShadowReceiverMaterial() [1/2]

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

set this material specific shadow receiving specific material

## setShadowReceiverMaterial() [2/2]

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

set this material specific shadow receiving 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 | ( | 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

## setSpecular() [2/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

## setTextureAnisotropy()

void Ogre::Technique::setTextureAnisotropy | ( | unsigned int | maxAniso | ) |

Sets the anisotropy level to be used for all textures.

Note
  This property has been moved to the TextureUnitState class, which is accessible via the Technique and Pass. For simplicity, this method allows you to set these properties for every current TeextureUnitState, If you need more precision, retrieve the Technique, Pass and TextureUnitState instances and set the property there.

See also
  TextureUnitState::setTextureAnisotropy

## setTextureFiltering()

void Ogre::Technique::setTextureFiltering | ( | TextureFilterOptions | filterType | ) |

Set texture filtering 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::setTextureFiltering

## Member Data Documentation

## mGPUDeviceNameRules

GPUDeviceNameRuleList Ogre::Technique::mGPUDeviceNameRules

protected

Definition at line 148 of file OgreTechnique.h.

## mGPUVendorRules

GPUVendorRuleList Ogre::Technique::mGPUVendorRules

protected

Definition at line 147 of file OgreTechnique.h.

## mIlluminationPasses

IlluminationPassList Ogre::Technique::mIlluminationPasses

protected

List of derived passes, categorised into IlluminationStage (ordered)

Definition at line 68 of file OgreTechnique.h.

## mIlluminationPassesCompilationPhase

IlluminationPassesState Ogre::Technique::mIlluminationPassesCompilationPhase

protected

Definition at line 72 of file OgreTechnique.h.

## mIsSupported

bool Ogre::Technique::mIsSupported

protected

Definition at line 71 of file OgreTechnique.h.

## mLodIndex

unsigned short Ogre::Technique::mLodIndex

protected

LOD level.

Definition at line 74 of file OgreTechnique.h.

## mName

String Ogre::Technique::mName

protected

Optional name for the technique.

Definition at line 80 of file OgreTechnique.h.

## mParent

Material* Ogre::Technique::mParent

protected

Definition at line 70 of file OgreTechnique.h.

## mPasses

Passes Ogre::Technique::mPasses

protected

List of primary passes.

Definition at line 66 of file OgreTechnique.h.

## mSchemeIndex

unsigned short Ogre::Technique::mSchemeIndex

protected

Scheme index, derived from scheme name but the names are held on MaterialManager, for speed an index is used here.

Definition at line 78 of file OgreTechnique.h.

## mShadowCasterMaterial

MaterialPtr Ogre::Technique::mShadowCasterMaterial

protected

When casting shadow, if not using default Ogre shadow casting material, or nor using fixed function casting, mShadowCasterMaterial let you customize per material shadow caster behavior.

Definition at line 92 of file OgreTechnique.h.

## mShadowCasterMaterialName

String Ogre::Technique::mShadowCasterMaterialName

protected

When casting shadow, if not using default Ogre shadow casting material, or nor using fixed function casting, mShadowCasterMaterial let you customize per material shadow caster behavior.There only material name is stored so that it can be loaded once all file parsed in a resource group.

Definition at line 97 of file OgreTechnique.h.

## mShadowReceiverMaterial

MaterialPtr Ogre::Technique::mShadowReceiverMaterial

protected

When receiving shadow, if not using default Ogre shadow receiving material, or nor using fixed function texture projection receiving, mShadowReceiverMaterial let you customize per material shadow caster behavior.

Definition at line 102 of file OgreTechnique.h.

## mShadowReceiverMaterialName

String Ogre::Technique::mShadowReceiverMaterialName

protected

When receiving shadow, if not using default Ogre shadow receiving material, or nor using fixed function texture projection receiving, mShadowReceiverMaterial let you customize per material shadow caster behavior.

There only material name is stored so that it can be loaded once all file parsed in a resource group.

Definition at line 107 of file OgreTechnique.h.

## mUserObjectBindings

UserObjectBindings Ogre::Technique::mUserObjectBindings

protected

Definition at line 110 of file OgreTechnique.h.

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

- OgreTechnique.h

Copyright © 2012 Torus Knot Software Ltd
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.