OGRE: Ogre::Pass Class Reference

| OGRE 2.2.4 Object-Oriented Graphics Rendering Engine

Public Types | Public Member Functions | Static Public Member Functions | List of all members
Ogre::Pass Class Reference
Core » Materials

Class defining a single pass of a Technique (of a Material), i.e. More...

`#include <OgrePass.h>`

Inheritance diagram for Ogre::Pass:
[legend]

## Public Types
typedef ConstVectorIterator< TextureUnitStates > | ConstTextureUnitStateIterator
typedef VectorIterator< TextureUnitStates > | TextureUnitStateIterator

## Public Member Functions
| Pass (Technique *parent, unsigned short index)
| Default constructor. More...
| Pass (Technique *parent, unsigned short index, const Pass &oth)
| Copy constructor. More...
virtual | ~Pass ()
HlmsDatablock * | _getDatablock (void) const
| Gets the internal datablock that acts as proxy for us. More...
size_t | _getTextureUnitWithContentTypeIndex (TextureUnitState::ContentType contentType, size_t index) const
| Gets the 'nth' texture which references the given content type. More...
void | _load (void)
| Internal method for loading this pass. More...
void | _notifyIndex (unsigned short index)
| Internal method to adjust pass index. More...
void | _prepare (void)
| Internal method for preparing to load this pass. More...
void | _unload (void)
| Internal method for unloading this pass. More...
void | _unprepare (void)
| Internal method for undoing the load preparartion for this pass. More...
void | _updateAutoParams (const AutoParamDataSource *source, uint16 variabilityMask) const
| Update automatic parameters. More...
void | addTextureUnitState (TextureUnitState *state)
| Adds the passed in TextureUnitState, to the existing Pass. 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
TextureUnitState * | createTextureUnitState (const String &textureName, unsigned short texCoordSet=0)
| Inserts a new TextureUnitState object into the Pass. More...
TextureUnitState * | createTextureUnitState (void)
| Inserts a new TextureUnitState object into the Pass. More...
CompareFunction | getAlphaRejectFunction (void) const
| Gets the alpha reject function. More...
unsigned char | getAlphaRejectValue (void) const
| Gets the alpha reject value. More...
const ColourValue & | getAmbient (void) const
| Gets the ambient colour reflectance of the pass. More...
const HlmsBlendblock * | getBlendblock (void) const
| Retrieves current blendblock. More...
bool | getColourWriteEnabled (void) const
| Determines if colour buffer writing is enabled for this pass. More...
const GpuProgramPtr & | getComputeProgram (void) const
| Gets the Tessellation EHull program used by this pass, only available after _load(). More...
const String & | getComputeProgramName (void) const
| Gets the name of the Tessellation Hull program used by this pass. More...
GpuProgramParametersSharedPtr | getComputeProgramParameters (void) const
| Gets the Tessellation Hull program parameters used by this pass. More...
const ColourValue & | getDiffuse (void) const
| Gets the diffuse colour reflectance of the pass. More...
const ColourValue & | getEmissive (void) const
| Gets the self illumination colour of the pass. More...
const ColourValue & | getFogColour (void) const
| Returns the fog colour for the scene. More...
Real | getFogDensity (void) const
| Returns the fog density for this pass. More...
Real | getFogEnd (void) const
| Returns the fog end distance for this pass. More...
FogMode | getFogMode (void) const
| Returns the fog mode for this pass. More...
bool | getFogOverride (void) const
| Returns true if this pass is to override the scene fog settings. More...
Real | getFogStart (void) const
| Returns the fog start distance for this pass. More...
const GpuProgramPtr & | getFragmentProgram (void) const
| Gets the fragment program used by this pass, only available after _load(). More...
const String & | getFragmentProgramName (void) const
| Gets the name of the fragment program used by this pass. More...
GpuProgramParametersSharedPtr | getFragmentProgramParameters (void) const
| Gets the fragment program parameters used by this pass. More...
const GpuProgramPtr & | getGeometryProgram (void) const
| Gets the geometry program used by this pass, only available after _load(). More...
const String & | getGeometryProgramName (void) const
| Gets the name of the geometry program used by this pass. More...
GpuProgramParametersSharedPtr | getGeometryProgramParameters (void) const
| Gets the geometry program parameters used by this pass. More...
uint32 | getId (void) const
unsigned short | getIndex (void) const
| Gets the index of this Pass in the parent Technique. More...
bool | getIteratePerLight (void) const
| Does this pass run once for every light in range? More...
bool | getLightClipPlanesEnabled () const
| Gets whether or not this pass will be clipped by user clips planes bounding the area covered by the light. More...
unsigned short | getLightCountPerIteration (void) const
| If light iteration is enabled, determine the number of lights per iteration. More...
uint32 | getLightMask () const
| Gets the light mask controlling which lights are used for this pass. More...
bool | getLightScissoringEnabled () const
| Gets whether or not this pass will be clipped by a scissor rectangle encompassing the lights that are being used in it. More...
const HlmsMacroblock * | getMacroblock (void) const
| Retrieves current macroblock. More...
unsigned short | getMaxSimultaneousLights (void) const
| Gets the maximum number of lights to be used by this pass. More...
const String & | getName (void) const
| Get the name of the pass. More...
size_t | getNumShadowContentTextures (void) const
unsigned short | getNumTextureUnitStates (void) const
| Returns the number of texture unit settings. More...
Light::LightTypes | getOnlyLightType () const
| Gets the single light type this pass runs for if getIteratePerLight and getRunOnlyForOneLightType are both true. More...
Technique * | getParent (void) const
| Gets the parent Technique. More...
size_t | getPassIterationCount (void) const
| Gets the pass iteration count value. More...
Real | getPointAttenuationConstant (void) const
| Returns the constant coefficient of point attenuation. More...
Real | getPointAttenuationLinear (void) const
| Returns the linear coefficient of point attenuation. More...
Real | getPointAttenuationQuadratic (void) const
| Returns the quadratic coefficient of point attenuation. More...
Real | getPointMaxSize (void) const
| Get the maximum point size, when point attenuation is in use. More...
Real | getPointMinSize (void) const
| Get the minimum point size, when point attenuation is in use. More...
Real | getPointSize (void) const
| Gets the point size of the pass. More...
bool | getPointSpritesEnabled (void) const
| Returns whether point sprites are enabled when rendering a point list. More...
virtual bool | getPolygonModeOverrideable (void) const
| Gets whether this renderable's chosen detail level can be overridden (downgraded) by the camera setting. More...
const String & | getResourceGroup (void) const
| Gets the resource group of the ultimate parent Material. More...
bool | getRunOnlyForOneLightType (void) const
| Does this pass run only for a single light type (if getIteratePerLight is true). More...
const ColourValue & | getSelfIllumination (void) const
| Gets the self illumination colour of the pass. More...
ShadeOptions | getShadingMode (void) const
| Returns the type of light shading to be used. More...
const GpuProgramPtr & | getShadowCasterFragmentProgram (void) const
| Gets the fragment program used by this pass when rendering shadow casters, only available after _load(). More...
const String & | getShadowCasterFragmentProgramName (void) const
| Gets the name of the fragment program used by this pass when rendering shadow casters. More...
GpuProgramParametersSharedPtr | getShadowCasterFragmentProgramParameters (void) const
| Gets the fragment program parameters used by this pass when rendering shadow casters. More...
const GpuProgramPtr & | getShadowCasterVertexProgram (void) const
| Gets the vertex program used by this pass when rendering shadow casters, only available after _load(). More...
const String & | getShadowCasterVertexProgramName (void) const
| Gets the name of the vertex program used by this pass when rendering shadow casters. More...
GpuProgramParametersSharedPtr | getShadowCasterVertexProgramParameters (void) const
| Gets the vertex program parameters used by this pass when rendering shadow casters. More...
Real | getShininess (void) const
| Gets the 'shininess' property of the pass (affects specular highlights). More...
const ColourValue & | getSpecular (void) const
| Gets the specular colour reflectance of the pass. More...
unsigned short | getStartLight (void) const
| Gets the light index that this pass will start at in the light list. More...
const GpuProgramPtr & | getTessellationDomainProgram (void) const
| Gets the Tessellation Domain program used by this pass, only available after _load(). More...
const String & | getTessellationDomainProgramName (void) const
| Gets the name of the Domain Evaluation program used by this pass. More...
GpuProgramParametersSharedPtr | getTessellationDomainProgramParameters (void) const
| Gets the Tessellation Domain program parameters used by this pass. More...
const GpuProgramPtr & | getTessellationHullProgram (void) const
| Gets the Tessellation Hull program used by this pass, only available after _load(). More...
const String & | getTessellationHullProgramName (void) const
| Gets the name of the Tessellation Hull program used by this pass. More...
GpuProgramParametersSharedPtr | getTessellationHullProgramParameters (void) const
| Gets the Tessellation Hull program parameters used by this pass. More...
TextureUnitState * | getTextureUnitState (const String &name)
| Retrieves the Texture Unit State matching name. More...
const TextureUnitState * | getTextureUnitState (const String &name) const
| Retrieves the Texture Unit State matching name. More...
TextureUnitState * | getTextureUnitState (size_t index)
| Retrieves a pointer to a texture unit state so it may be modified. More...
const TextureUnitState * | getTextureUnitState (size_t index) const
| Retrieves a const pointer to a texture unit state. More...
unsigned short | getTextureUnitStateIndex (const TextureUnitState *state) const
| Retrieve the index of the Texture Unit State in the pass. More...
TextureUnitStateIterator | getTextureUnitStateIterator (void)
| Get an iterator over the TextureUnitStates contained in this Pass. More...
ConstTextureUnitStateIterator | getTextureUnitStateIterator (void) const
| Get an iterator over the TextureUnitStates contained in this Pass. 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...
TrackVertexColourType | getVertexColourTracking (void) const
| Gets which material properties follow the vertex colour. More...
const GpuProgramPtr & | getVertexProgram (void) const
| Gets the vertex program used by this pass, only available after _load(). More...
const String & | getVertexProgramName (void) const
| Gets the name of the vertex program used by this pass. More...
GpuProgramParametersSharedPtr | getVertexProgramParameters (void) const
| Gets the vertex program parameters used by this pass. More...
bool | hasComputeProgram (void) const
| Returns true if this pass uses a programmable compute pipeline. More...
bool | hasFragmentProgram (void) const
| Returns true if this pass uses a programmable fragment pipeline. More...
bool | hasGeometryProgram (void) const
| Returns true if this pass uses a programmable geometry pipeline. More...
bool | hasShadowCasterFragmentProgram (void) const
| Returns true if this pass uses a shadow caster fragment program. More...
bool | hasShadowCasterVertexProgram (void) const
| Returns true if this pass uses a shadow caster vertex program. More...
bool | hasTessellationDomainProgram (void) const
| Returns true if this pass uses a programmable tessellation control pipeline. More...
bool | hasTessellationHullProgram (void) const
| Returns true if this pass uses a programmable tessellation control pipeline. More...
bool | hasVertexProgram (void) const
| Returns true if this pass uses a programmable vertex pipeline. More...
void | insertShadowContentTypeLookup (size_t textureUnitIndex)
| Call this function when a texture unit changed to type CONTENT_SHADOW. More...
bool | isAmbientOnly (void) const
| Returns whether this pass is ambient only. More...
bool | isLoaded (void) const
| Is this loaded? More...
bool | isPointAttenuationEnabled (void) const
| Returns whether points are attenuated with distance. More...
bool | isProgrammable (void) const
| Returns true if this pass is programmable i.e. includes either a vertex or fragment program. More...
bool | isTransparent (void) const
| Returns true if this pass has some element of transparency. More...
| OGRE_MUTEX (mGpuProgramChangeMutex)
| OGRE_MUTEX (mTexUnitChangeMutex)
| OGRE_STATIC_MUTEX (msDirtyHashListMutex)
| OGRE_STATIC_MUTEX (msPassGraveyardMutex)
void | operator delete (void *ptr)
void | operator delete (void *ptr, const char *, int, const char *)
void | operator delete (void *ptr, void *)
void | operator delete[] (void *ptr)
void | operator delete[] (void *ptr, const char *, int, const char *)
void * | operator new (size_t sz)
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 *ptr)
| placement operator new More...
void * | operator new[] (size_t sz)
void * | operator new[] (size_t sz, const char *file, int line, const char *func)
| array operator new, with debug line info More...
Pass & | operator= (const Pass &oth)
| Operator = overload. More...
void | recreateShadowContentTypeLookup (void)
| Recreates the contents of mShadowContentTypeLookup from scratch. More...
void | removeAllTextureUnitStates (void)
| Removes all texture unit settings. More...
void | removeShadowContentTypeLookup (size_t textureUnitIndex)
| Call this function when a texture unit is removed (any type), or when a tex unit that used to be of type CONTENT_SHADOW, no longer is. More...
void | removeTextureUnitState (unsigned short index)
| Removes the indexed texture unit state from this pass. More...
void | setAlphaRejectFunction (CompareFunction func)
| Sets the alpha reject function. More...
void | setAlphaRejectValue (unsigned char val)
| Gets the alpha reject value. More...
void | setAmbient (const ColourValue &ambient)
| Sets the ambient colour reflectance properties of this pass. More...
void | setAmbient (Real red, Real green, Real blue)
| Sets the ambient colour reflectance properties of this pass. More...
void | setBlendblock (const HlmsBlendblock &blendblock)
| Changes the current blendblock for a new one. Pointer can't be null. More...
void | setComputeProgram (const String &name, bool resetParams=true)
| Sets the details of the compute program to use. More...
void | setComputeProgramParameters (GpuProgramParametersSharedPtr params)
| Sets the Tessellation Evaluation program parameters. More...
void | setDiffuse (const ColourValue &diffuse)
| Sets the diffuse colour reflectance properties of this pass. More...
void | setDiffuse (Real red, Real green, Real blue, Real alpha)
| Sets the diffuse colour reflectance properties of this pass. More...
void | setEmissive (const ColourValue &emissive)
| Sets the amount of self-illumination an object has. More...
void | setEmissive (Real red, Real green, Real blue)
| Sets the amount of self-illumination an object has. 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 this pass. More...
void | setFragmentProgram (const String &name, bool resetParams=true)
| Sets the details of the fragment program to use. More...
void | setFragmentProgramParameters (GpuProgramParametersSharedPtr params)
| Sets the fragment program parameters. More...
void | setGeometryProgram (const String &name, bool resetParams=true)
| Sets the details of the geometry program to use. More...
void | setGeometryProgramParameters (GpuProgramParametersSharedPtr params)
| Sets the geometry program parameters. More...
void | setIteratePerLight (bool enabled, bool onlyForOneLightType=true, Light::LightTypes lightType=Light::LT_POINT)
| Sets whether or not this pass should iterate per light or number of lights which can affect the object being rendered. More...
void | setLightClipPlanesEnabled (bool enabled)
| Gets whether or not this pass will be clipped by user clips planes bounding the area covered by the light. More...
void | setLightCountPerIteration (unsigned short c)
| If light iteration is enabled, determine the number of lights per iteration. More...
void | setLightMask (uint32 mask)
| Sets the light mask which can be matched to specific light flags to be handled by this pass. More...
void | setLightScissoringEnabled (bool enabled)
| Sets whether or not this pass will be clipped by a scissor rectangle encompassing the lights that are being used in it. More...
void | setMacroblock (const HlmsMacroblock &macroblock)
| Changes the current macroblock for a new one. Pointer can't be null. More...
void | setMaxSimultaneousLights (unsigned short maxLights)
| Sets the maximum number of lights to be used by this pass. More...
void | setName (const String &name)
void | setPassIterationCount (const size_t count)
| set the number of iterations that this pass should perform when doing fast multi pass operation. More...
void | setPointAttenuation (bool enabled, Real constant=0.0f, Real linear=1.0f, Real quadratic=0.0f)
| Sets how points are attenuated with distance. More...
void | setPointMaxSize (Real max)
| Set the maximum point size, when point attenuation is in use. More...
void | setPointMinSize (Real min)
| Set the minimum point size, when point attenuation is in use. More...
void | setPointSize (Real ps)
| Sets the point size of this pass. More...
void | setPointSpritesEnabled (bool enabled)
| Sets whether or not rendering points using OT_POINT_LIST will render point sprites (textured quads) or plain points (dots). More...
virtual void | setPolygonModeOverrideable (bool override)
| Sets whether this pass's chosen detail level can be overridden (downgraded) by the camera setting. More...
void | setSamplerblock (const HlmsSamplerblock &samplerblock)
| Set samplerblock for every texture unit. More...
void | setSelfIllumination (const ColourValue &selfIllum)
| Sets the amount of self-illumination an object has. More...
void | setSelfIllumination (Real red, Real green, Real blue)
| Sets the amount of self-illumination an object has. More...
void | setShadingMode (ShadeOptions mode)
| Sets the type of light shading required. More...
void | setShadowCasterFragmentProgram (const String &name)
| Sets the details of the fragment program to use when rendering as a shadow caster. More...
void | setShadowCasterFragmentProgramParameters (GpuProgramParametersSharedPtr params)
| Sets the fragment program parameters for rendering as a shadow caster. More...
void | setShadowCasterVertexProgram (const String &name)
| Sets the details of the vertex program to use when rendering as a shadow caster. More...
void | setShadowCasterVertexProgramParameters (GpuProgramParametersSharedPtr params)
| Sets the vertex program parameters for rendering as a shadow caster. More...
void | setShininess (Real val)
| Sets the shininess of the pass, affecting the size of specular highlights. More...
void | setSpecular (const ColourValue &specular)
| Sets the specular colour reflectance properties of this pass. More...
void | setSpecular (Real red, Real green, Real blue, Real alpha)
| Sets the specular colour reflectance properties of this pass. More...
void | setStartLight (unsigned short startLight)
| Sets the light index that this pass will start at in the light list. More...
void | setTessellationDomainProgram (const String &name, bool resetParams=true)
| Sets the details of the Tessellation domain program to use. More...
void | setTessellationDomainProgramParameters (GpuProgramParametersSharedPtr params)
| Sets the Tessellation Domain program parameters. More...
void | setTessellationHullProgram (const String &name, bool resetParams=true)
| Support for shader model 5.0, hull and domain shaders. More...
void | setTessellationHullProgramParameters (GpuProgramParametersSharedPtr params)
| Sets the Tessellation Hull program parameters. More...
void | setVertexColourTracking (TrackVertexColourType tracking)
| Sets which material properties follow the vertex colour. More...
void | setVertexProgram (const String &name, bool resetParams=true)
| Sets the details of the vertex program to use. More...
void | setVertexProgramParameters (GpuProgramParametersSharedPtr params)
| Sets the vertex program parameters. More...

## Static Public Member Functions
static void | _getBlendFlags (SceneBlendType type, SceneBlendFactor &source, SceneBlendFactor &dest)
| Used to get scene blending flags from a blending type. More...

## Detailed Description

Class defining a single pass of a Technique (of a Material), i.e.

a single rendering call.

Remarks
  Rendering can be repeated with many passes for more complex effects. Each pass is either a fixed-function pass (meaning it does not use a vertex or fragment program) or a programmable pass (meaning it does use either a vertex and fragment program, or both).

  Programmable passes are complex to define, because they require custom programs and you have to set all constant inputs to the programs (like the position of lights, any base material colours you wish to use etc), but they do give you much total flexibility over the algorithms used to render your pass, and you can create some effects which are impossible with a fixed-function pass. On the other hand, you can define a fixed-function pass in very little time, and you can use a range of fixed-function effects like environment mapping very easily, plus your pass will be more likely to be compatible with older hardware. There are pros and cons to both, just remember that if you use a programmable pass to create some great effects, allow more time for definition and testing.

## Member Typedef Documentation

## ◆ ConstTextureUnitStateIterator

typedef ConstVectorIterator<TextureUnitStates> Ogre::Pass::ConstTextureUnitStateIterator

## ◆ TextureUnitStateIterator

typedef VectorIterator<TextureUnitStates> Ogre::Pass::TextureUnitStateIterator

## Constructor & Destructor Documentation

## ◆ Pass() [1/2]

Ogre::Pass::Pass | ( | Technique * | parent,
|  | unsigned short | index
| ) |  |

Default constructor.

## ◆ Pass() [2/2]

Ogre::Pass::Pass | ( | Technique * | parent,
|  | unsigned short | index,
|  | const Pass & | oth
| ) |  |

Copy constructor.

## ◆ ~Pass()

virtual Ogre::Pass::~Pass | ( |  | ) |
| virtual

## Member Function Documentation

## ◆ _getBlendFlags()

static void Ogre::Pass::_getBlendFlags | ( | SceneBlendType | type,
|  | SceneBlendFactor & | source,
|  | SceneBlendFactor & | dest
| ) |  |
| static

Used to get scene blending flags from a blending type.

## ◆ _getDatablock()

HlmsDatablock* Ogre::Pass::_getDatablock | ( | void |  | ) | const

Gets the internal datablock that acts as proxy for us.

## ◆ _getTextureUnitWithContentTypeIndex()

size_t Ogre::Pass::_getTextureUnitWithContentTypeIndex | ( | TextureUnitState::ContentType | contentType,
|  | size_t | index
| ) |  | const

Gets the 'nth' texture which references the given content type.

Remarks
  If the 'nth' texture unit which references the content type doesn't exist, then this method returns an arbitrary high-value outside the valid range to index texture units.

## ◆ _load()

void Ogre::Pass::_load | ( | void |  | ) |

Internal method for loading this pass.

## ◆ _notifyIndex()

void Ogre::Pass::_notifyIndex | ( | unsigned short | index | ) |

Internal method to adjust pass index.

## ◆ _prepare()

void Ogre::Pass::_prepare | ( | void |  | ) |

Internal method for preparing to load this pass.

## ◆ _unload()

void Ogre::Pass::_unload | ( | void |  | ) |

Internal method for unloading this pass.

## ◆ _unprepare()

void Ogre::Pass::_unprepare | ( | void |  | ) |

Internal method for undoing the load preparartion for this pass.

## ◆ _updateAutoParams()

void Ogre::Pass::_updateAutoParams | ( | const AutoParamDataSource * | source,
|  | uint16 | variabilityMask
| ) |  | const

Update automatic parameters.

Parameters

  source | The source of the parameters
  variabilityMask | A mask of GpuParamVariability which identifies which autos will need updating

## ◆ addTextureUnitState()

void Ogre::Pass::addTextureUnitState | ( | TextureUnitState * | state | ) |

Adds the passed in TextureUnitState, to the existing Pass.

Parameters

  state | The Texture Unit State to be attached to this pass. It must not be attached to another pass.

Note
  Throws an exception if the TextureUnitState is attached to another Pass.

## ◆ applyTextureAliases()

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

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

All Texture Unit States within the pass 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 pass.

## ◆ calculateSize()

size_t Ogre::Pass::calculateSize | ( | void |  | ) | const

## ◆ createTextureUnitState() [1/2]

TextureUnitState* Ogre::Pass::createTextureUnitState | ( | const String & | textureName,
|  | unsigned short | texCoordSet = `0`
| ) |  |

Inserts a new TextureUnitState object into the Pass.

Remarks
  This unit is is added on top of all previous units.

Parameters

  textureName | The basic name of the texture e.g. brickwall.jpg, stonefloor.png
  texCoordSet | The index of the texture coordinate set to use.

Note
  Applies to both fixed-function and programmable passes.

## ◆ createTextureUnitState() [2/2]

TextureUnitState* Ogre::Pass::createTextureUnitState | ( | void |  | ) |

Inserts a new TextureUnitState object into the Pass.

Remarks
  This unit is is added on top of all previous units.

## ◆ getAlphaRejectFunction()

CompareFunction Ogre::Pass::getAlphaRejectFunction | ( | void |  | ) | const
| inline

Gets the alpha reject function.

See setAlphaRejectSettings for more information.

## ◆ getAlphaRejectValue()

unsigned char Ogre::Pass::getAlphaRejectValue | ( | void |  | ) | const
| inline

Gets the alpha reject value.

See setAlphaRejectSettings for more information.

## ◆ getAmbient()

const ColourValue& Ogre::Pass::getAmbient | ( | void |  | ) | const

Gets the ambient colour reflectance of the pass.

## ◆ getBlendblock()

const HlmsBlendblock* Ogre::Pass::getBlendblock | ( | void |  | ) | const

Retrieves current blendblock.

Don't const_cast the return value to modify it. @See HlmsDatablock remarks.

## ◆ getColourWriteEnabled()

bool Ogre::Pass::getColourWriteEnabled | ( | void |  | ) | const

Determines if colour buffer writing is enabled for this pass.

## ◆ getComputeProgram()

const GpuProgramPtr& Ogre::Pass::getComputeProgram | ( | void |  | ) | const

Gets the Tessellation EHull program used by this pass, only available after _load().

## ◆ getComputeProgramName()

const String& Ogre::Pass::getComputeProgramName | ( | void |  | ) | const

Gets the name of the Tessellation Hull program used by this pass.

## ◆ getComputeProgramParameters()

GpuProgramParametersSharedPtr Ogre::Pass::getComputeProgramParameters | ( | void |  | ) | const

Gets the Tessellation Hull program parameters used by this pass.

## ◆ getDiffuse()

const ColourValue& Ogre::Pass::getDiffuse | ( | void |  | ) | const

Gets the diffuse colour reflectance of the pass.

## ◆ getEmissive()

const ColourValue& Ogre::Pass::getEmissive | ( | void |  | ) | const
| inline

Gets the self illumination colour of the pass.

See also
  getSelfIllumination

## ◆ getFogColour()

const ColourValue& Ogre::Pass::getFogColour | ( | void |  | ) | const

Returns the fog colour for the scene.

## ◆ getFogDensity()

Real Ogre::Pass::getFogDensity | ( | void |  | ) | const

Returns the fog density for this pass.

Note
  Only valid if getFogOverride is true.

## ◆ getFogEnd()

Real Ogre::Pass::getFogEnd | ( | void |  | ) | const

Returns the fog end distance for this pass.

Note
  Only valid if getFogOverride is true.

## ◆ getFogMode()

FogMode Ogre::Pass::getFogMode | ( | void |  | ) | const

Returns the fog mode for this pass.

Note
  Only valid if getFogOverride is true.

## ◆ getFogOverride()

bool Ogre::Pass::getFogOverride | ( | void |  | ) | const

Returns true if this pass is to override the scene fog settings.

## ◆ getFogStart()

Real Ogre::Pass::getFogStart | ( | void |  | ) | const

Returns the fog start distance for this pass.

Note
  Only valid if getFogOverride is true.

## ◆ getFragmentProgram()

const GpuProgramPtr& Ogre::Pass::getFragmentProgram | ( | void |  | ) | const

Gets the fragment program used by this pass, only available after _load().

## ◆ getFragmentProgramName()

const String& Ogre::Pass::getFragmentProgramName | ( | void |  | ) | const

Gets the name of the fragment program used by this pass.

## ◆ getFragmentProgramParameters()

GpuProgramParametersSharedPtr Ogre::Pass::getFragmentProgramParameters | ( | void |  | ) | const

Gets the fragment program parameters used by this pass.

## ◆ getGeometryProgram()

const GpuProgramPtr& Ogre::Pass::getGeometryProgram | ( | void |  | ) | const

Gets the geometry program used by this pass, only available after _load().

## ◆ getGeometryProgramName()

const String& Ogre::Pass::getGeometryProgramName | ( | void |  | ) | const

Gets the name of the geometry program used by this pass.

## ◆ getGeometryProgramParameters()

GpuProgramParametersSharedPtr Ogre::Pass::getGeometryProgramParameters | ( | void |  | ) | const

Gets the geometry program parameters used by this pass.

## ◆ getId()

uint32 Ogre::Pass::getId | ( | void |  | ) | const
| inline

## ◆ getIndex()

unsigned short Ogre::Pass::getIndex | ( | void |  | ) | const
| inline

Gets the index of this Pass in the parent Technique.

## ◆ getIteratePerLight()

bool Ogre::Pass::getIteratePerLight | ( | void |  | ) | const
| inline

Does this pass run once for every light in range?

## ◆ getLightClipPlanesEnabled()

bool Ogre::Pass::getLightClipPlanesEnabled | ( |  | ) | const
| inline

Gets whether or not this pass will be clipped by user clips planes bounding the area covered by the light.

## ◆ getLightCountPerIteration()

unsigned short Ogre::Pass::getLightCountPerIteration | ( | void |  | ) | const

If light iteration is enabled, determine the number of lights per iteration.

## ◆ getLightMask()

uint32 Ogre::Pass::getLightMask | ( |  | ) | const

Gets the light mask controlling which lights are used for this pass.

## ◆ getLightScissoringEnabled()

bool Ogre::Pass::getLightScissoringEnabled | ( |  | ) | const
| inline

Gets whether or not this pass will be clipped by a scissor rectangle encompassing the lights that are being used in it.

## ◆ getMacroblock()

const HlmsMacroblock* Ogre::Pass::getMacroblock | ( | void |  | ) | const

Retrieves current macroblock.

Don't const_cast the return value to modify it. @See HlmsDatablock remarks.

## ◆ getMaxSimultaneousLights()

unsigned short Ogre::Pass::getMaxSimultaneousLights | ( | void |  | ) | const

Gets the maximum number of lights to be used by this pass.

## ◆ getName()

const String& Ogre::Pass::getName | ( | void |  | ) | const
| inline

Get the name of the pass.

## ◆ getNumShadowContentTextures()

size_t Ogre::Pass::getNumShadowContentTextures | ( | void |  | ) | const
| inline

## ◆ getNumTextureUnitStates()

unsigned short Ogre::Pass::getNumTextureUnitStates | ( | void |  | ) | const
| inline

Returns the number of texture unit settings.

## ◆ getOnlyLightType()

Light::LightTypes Ogre::Pass::getOnlyLightType | ( |  | ) | const
| inline

Gets the single light type this pass runs for if getIteratePerLight and getRunOnlyForOneLightType are both true.

## ◆ getParent()

Technique* Ogre::Pass::getParent | ( | void |  | ) | const
| inline

Gets the parent Technique.

## ◆ getPassIterationCount()

size_t Ogre::Pass::getPassIterationCount | ( | void |  | ) | const
| inline

Gets the pass iteration count value.

## ◆ getPointAttenuationConstant()

Real Ogre::Pass::getPointAttenuationConstant | ( | void |  | ) | const

Returns the constant coefficient of point attenuation.

## ◆ getPointAttenuationLinear()

Real Ogre::Pass::getPointAttenuationLinear | ( | void |  | ) | const

Returns the linear coefficient of point attenuation.

## ◆ getPointAttenuationQuadratic()

Real Ogre::Pass::getPointAttenuationQuadratic | ( | void |  | ) | const

Returns the quadratic coefficient of point attenuation.

## ◆ getPointMaxSize()

Real Ogre::Pass::getPointMaxSize | ( | void |  | ) | const

Get the maximum point size, when point attenuation is in use.

Remarks
  0 indicates the max size supported by the card.

## ◆ getPointMinSize()

Real Ogre::Pass::getPointMinSize | ( | void |  | ) | const

Get the minimum point size, when point attenuation is in use.

## ◆ getPointSize()

Real Ogre::Pass::getPointSize | ( | void |  | ) | const

Gets the point size of the pass.

Remarks
  This property determines what point size is used to render a point list.

## ◆ getPointSpritesEnabled()

bool Ogre::Pass::getPointSpritesEnabled | ( | void |  | ) | const

Returns whether point sprites are enabled when rendering a point list.

## ◆ getPolygonModeOverrideable()

virtual bool Ogre::Pass::getPolygonModeOverrideable | ( | void |  | ) | const
| inlinevirtual

Gets whether this renderable's chosen detail level can be overridden (downgraded) by the camera setting.

## ◆ getResourceGroup()

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

Gets the resource group of the ultimate parent Material.

## ◆ getRunOnlyForOneLightType()

bool Ogre::Pass::getRunOnlyForOneLightType | ( | void |  | ) | const
| inline

Does this pass run only for a single light type (if getIteratePerLight is true).

## ◆ getSelfIllumination()

const ColourValue& Ogre::Pass::getSelfIllumination | ( | void |  | ) | const

Gets the self illumination colour of the pass.

## ◆ getShadingMode()

ShadeOptions Ogre::Pass::getShadingMode | ( | void |  | ) | const

Returns the type of light shading to be used.

## ◆ getShadowCasterFragmentProgram()

const GpuProgramPtr& Ogre::Pass::getShadowCasterFragmentProgram | ( | void |  | ) | const

Gets the fragment program used by this pass when rendering shadow casters, only available after _load().

## ◆ getShadowCasterFragmentProgramName()

const String& Ogre::Pass::getShadowCasterFragmentProgramName | ( | void |  | ) | const

Gets the name of the fragment program used by this pass when rendering shadow casters.

## ◆ getShadowCasterFragmentProgramParameters()

GpuProgramParametersSharedPtr Ogre::Pass::getShadowCasterFragmentProgramParameters | ( | void |  | ) | const

Gets the fragment program parameters used by this pass when rendering shadow casters.

## ◆ getShadowCasterVertexProgram()

const GpuProgramPtr& Ogre::Pass::getShadowCasterVertexProgram | ( | void |  | ) | const

Gets the vertex program used by this pass when rendering shadow casters, only available after _load().

## ◆ getShadowCasterVertexProgramName()

const String& Ogre::Pass::getShadowCasterVertexProgramName | ( | void |  | ) | const

Gets the name of the vertex program used by this pass when rendering shadow casters.

## ◆ getShadowCasterVertexProgramParameters()

GpuProgramParametersSharedPtr Ogre::Pass::getShadowCasterVertexProgramParameters | ( | void |  | ) | const

Gets the vertex program parameters used by this pass when rendering shadow casters.

## ◆ getShininess()

Real Ogre::Pass::getShininess | ( | void |  | ) | const

Gets the 'shininess' property of the pass (affects specular highlights).

## ◆ getSpecular()

const ColourValue& Ogre::Pass::getSpecular | ( | void |  | ) | const

Gets the specular colour reflectance of the pass.

## ◆ getStartLight()

unsigned short Ogre::Pass::getStartLight | ( | void |  | ) | const

Gets the light index that this pass will start at in the light list.

## ◆ getTessellationDomainProgram()

const GpuProgramPtr& Ogre::Pass::getTessellationDomainProgram | ( | void |  | ) | const

Gets the Tessellation Domain program used by this pass, only available after _load().

## ◆ getTessellationDomainProgramName()

const String& Ogre::Pass::getTessellationDomainProgramName | ( | void |  | ) | const

Gets the name of the Domain Evaluation program used by this pass.

## ◆ getTessellationDomainProgramParameters()

GpuProgramParametersSharedPtr Ogre::Pass::getTessellationDomainProgramParameters | ( | void |  | ) | const

Gets the Tessellation Domain program parameters used by this pass.

## ◆ getTessellationHullProgram()

const GpuProgramPtr& Ogre::Pass::getTessellationHullProgram | ( | void |  | ) | const

Gets the Tessellation Hull program used by this pass, only available after _load().

## ◆ getTessellationHullProgramName()

const String& Ogre::Pass::getTessellationHullProgramName | ( | void |  | ) | const

Gets the name of the Tessellation Hull program used by this pass.

## ◆ getTessellationHullProgramParameters()

GpuProgramParametersSharedPtr Ogre::Pass::getTessellationHullProgramParameters | ( | void |  | ) | const

Gets the Tessellation Hull program parameters used by this pass.

## ◆ getTextureUnitState() [1/4]

TextureUnitState* Ogre::Pass::getTextureUnitState | ( | const String & | name | ) |

Retrieves the Texture Unit State matching name.

Returns 0 if name match is not found.

## ◆ getTextureUnitState() [2/4]

const TextureUnitState* Ogre::Pass::getTextureUnitState | ( | const String & | name | ) | const

Retrieves the Texture Unit State matching name.

Returns 0 if name match is not found.

## ◆ getTextureUnitState() [3/4]

TextureUnitState* Ogre::Pass::getTextureUnitState | ( | size_t | index | ) |

Retrieves a pointer to a texture unit state so it may be modified.

## ◆ getTextureUnitState() [4/4]

const TextureUnitState* Ogre::Pass::getTextureUnitState | ( | size_t | index | ) | const

Retrieves a const pointer to a texture unit state.

## ◆ getTextureUnitStateIndex()

unsigned short Ogre::Pass::getTextureUnitStateIndex | ( | const TextureUnitState * | state | ) | const

Retrieve the index of the Texture Unit State in the pass.

Parameters

  state | The Texture Unit State this is attached to this pass.

Note
  Throws an exception if the state is not attached to the pass.

## ◆ getTextureUnitStateIterator() [1/2]

TextureUnitStateIterator Ogre::Pass::getTextureUnitStateIterator | ( | void |  | ) |

Get an iterator over the TextureUnitStates contained in this Pass.

## ◆ getTextureUnitStateIterator() [2/2]

ConstTextureUnitStateIterator Ogre::Pass::getTextureUnitStateIterator | ( | void |  | ) | const

Get an iterator over the TextureUnitStates contained in this Pass.

## ◆ getUserObjectBindings() [1/2]

UserObjectBindings& Ogre::Pass::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::Pass::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.

## ◆ getVertexColourTracking()

TrackVertexColourType Ogre::Pass::getVertexColourTracking | ( | void |  | ) | const

Gets which material properties follow the vertex colour.

## ◆ getVertexProgram()

const GpuProgramPtr& Ogre::Pass::getVertexProgram | ( | void |  | ) | const

Gets the vertex program used by this pass, only available after _load().

## ◆ getVertexProgramName()

const String& Ogre::Pass::getVertexProgramName | ( | void |  | ) | const

Gets the name of the vertex program used by this pass.

## ◆ getVertexProgramParameters()

GpuProgramParametersSharedPtr Ogre::Pass::getVertexProgramParameters | ( | void |  | ) | const

Gets the vertex program parameters used by this pass.

## ◆ hasComputeProgram()

bool Ogre::Pass::hasComputeProgram | ( | void |  | ) | const
| inline

Returns true if this pass uses a programmable compute pipeline.

## ◆ hasFragmentProgram()

bool Ogre::Pass::hasFragmentProgram | ( | void |  | ) | const
| inline

Returns true if this pass uses a programmable fragment pipeline.

## ◆ hasGeometryProgram()

bool Ogre::Pass::hasGeometryProgram | ( | void |  | ) | const
| inline

Returns true if this pass uses a programmable geometry pipeline.

## ◆ hasShadowCasterFragmentProgram()

bool Ogre::Pass::hasShadowCasterFragmentProgram | ( | void |  | ) | const
| inline

Returns true if this pass uses a shadow caster fragment program.

## ◆ hasShadowCasterVertexProgram()

bool Ogre::Pass::hasShadowCasterVertexProgram | ( | void |  | ) | const
| inline

Returns true if this pass uses a shadow caster vertex program.

## ◆ hasTessellationDomainProgram()

bool Ogre::Pass::hasTessellationDomainProgram | ( | void |  | ) | const
| inline

Returns true if this pass uses a programmable tessellation control pipeline.

## ◆ hasTessellationHullProgram()

bool Ogre::Pass::hasTessellationHullProgram | ( | void |  | ) | const
| inline

Returns true if this pass uses a programmable tessellation control pipeline.

## ◆ hasVertexProgram()

bool Ogre::Pass::hasVertexProgram | ( | void |  | ) | const
| inline

Returns true if this pass uses a programmable vertex pipeline.

## ◆ insertShadowContentTypeLookup()

void Ogre::Pass::insertShadowContentTypeLookup | ( | size_t | textureUnitIndex | ) |

Call this function when a texture unit changed to type CONTENT_SHADOW.

Parameters

  textureUnitIndex | Texture Unit index of the TU being changed

## ◆ isAmbientOnly()

bool Ogre::Pass::isAmbientOnly | ( | void |  | ) | const

Returns whether this pass is ambient only.

## ◆ isLoaded()

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

Is this loaded?

## ◆ isPointAttenuationEnabled()

bool Ogre::Pass::isPointAttenuationEnabled | ( | void |  | ) | const

Returns whether points are attenuated with distance.

## ◆ isProgrammable()

bool Ogre::Pass::isProgrammable | ( | void |  | ) | const
| inline

Returns true if this pass is programmable i.e. includes either a vertex or fragment program.

## ◆ isTransparent()

bool Ogre::Pass::isTransparent | ( | void |  | ) | const

Returns true if this pass has some element of transparency.

## ◆ OGRE_MUTEX() [1/2]

Ogre::Pass::OGRE_MUTEX | ( | mGpuProgramChangeMutex |  | ) |

## ◆ OGRE_MUTEX() [2/2]

Ogre::Pass::OGRE_MUTEX | ( | mTexUnitChangeMutex |  | ) |

## ◆ OGRE_STATIC_MUTEX() [1/2]

Ogre::Pass::OGRE_STATIC_MUTEX | ( | msDirtyHashListMutex |  | ) |

## ◆ OGRE_STATIC_MUTEX() [2/2]

Ogre::Pass::OGRE_STATIC_MUTEX | ( | msPassGraveyardMutex |  | ) |

## ◆ operator delete() [1/3]

template<class Alloc >

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

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

template<class Alloc >

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

## ◆ operator delete() [3/3]

template<class Alloc >

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

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

template<class Alloc >

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

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

template<class Alloc >

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

## ◆ operator new() [1/3]

template<class Alloc >

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

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

template<class Alloc >

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

operator new, with debug line info

## ◆ operator new() [3/3]

template<class Alloc >

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

placement operator new

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

template<class Alloc >

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

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

template<class Alloc >

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

array operator new, with debug line info

## ◆ operator=()

Pass& Ogre::Pass::operator= | ( | const Pass & | oth | ) |

Operator = overload.

## ◆ recreateShadowContentTypeLookup()

void Ogre::Pass::recreateShadowContentTypeLookup | ( | void |  | ) |

Recreates the contents of mShadowContentTypeLookup from scratch.

## ◆ removeAllTextureUnitStates()

void Ogre::Pass::removeAllTextureUnitStates | ( | void |  | ) |

Removes all texture unit settings.

## ◆ removeShadowContentTypeLookup()

void Ogre::Pass::removeShadowContentTypeLookup | ( | size_t | textureUnitIndex | ) |

Call this function when a texture unit is removed (any type), or when a tex unit that used to be of type CONTENT_SHADOW, no longer is.

## ◆ removeTextureUnitState()

void Ogre::Pass::removeTextureUnitState | ( | unsigned short | index | ) |

Removes the indexed texture unit state from this pass.

Remarks
  Note that removing a texture which is not the topmost will have a larger performance impact.

## ◆ setAlphaRejectFunction()

void Ogre::Pass::setAlphaRejectFunction | ( | CompareFunction | func | ) |

Sets the alpha reject function.

See setAlphaRejectSettings for more information.

## ◆ setAlphaRejectValue()

void Ogre::Pass::setAlphaRejectValue | ( | unsigned char | val | ) |

Gets the alpha reject value.

See setAlphaRejectSettings for more information.

## ◆ setAmbient() [1/2]

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

Sets the ambient colour reflectance properties of this pass.

Remarks
  The base colour of a pass is determined by how much red, green and blue light is reflects (provided texture layer #0 has a blend mode other than LBO_REPLACE). This property determines how much ambient light (directionless global light) is reflected. The default is full white, meaning objects are completely globally illuminated. Reduce this if you want to see diffuse or specular light effects, or change the blend of colours to make the object have a base colour other than white.

Note
  This setting has no effect if dynamic lighting is disabled (see Pass::setLightingEnabled), or if this is a programmable pass.

## ◆ setAmbient() [2/2]

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

Sets the ambient colour reflectance properties of this pass.

Remarks
  The base colour of a pass is determined by how much red, green and blue light is reflects (provided texture layer #0 has a blend mode other than LBO_REPLACE). This property determines how much ambient light (directionless global light) is reflected. The default is full white, meaning objects are completely globally illuminated. Reduce this if you want to see diffuse or specular light effects, or change the blend of colours to make the object have a base colour other than white.

Note
  This setting has no effect if dynamic lighting is disabled (see Pass::setLightingEnabled), or if this is a programmable pass.

## ◆ setBlendblock()

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

Changes the current blendblock for a new one. Pointer can't be null.

## ◆ setComputeProgram()

void Ogre::Pass::setComputeProgram | ( | const String & | name,
|  | bool | resetParams = `true`
| ) |  |

Sets the details of the compute program to use.

Remarks
  Only applicable to programmable passes, this sets the details of the compute program to use in this pass. The program will not be loaded until the parent Material is loaded.

Parameters

  name | The name of the program - this must have been created using GpuProgramManager by the time that this Pass is loaded. If this parameter is blank, any compute program in this pass is disabled.
  resetParams | If true, this will create a fresh set of parameters from the new program being linked, so if you had previously set parameters you will have to set them again. If you set this to false, you must be absolutely sure that the parameters match perfectly, and in the case of named parameters refers to the indexes underlying them, not just the names.

## ◆ setComputeProgramParameters()

void Ogre::Pass::setComputeProgramParameters | ( | GpuProgramParametersSharedPtr | params | ) |

Sets the Tessellation Evaluation program parameters.

Remarks
  Only applicable to programmable passes.

## ◆ setDiffuse() [1/2]

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

Sets the diffuse colour reflectance properties of this pass.

Remarks
  The base colour of a pass is determined by how much red, green and blue light is reflects (provided texture layer #0 has a blend mode other than LBO_REPLACE). This property determines how much diffuse light (light from instances of the Light class in the scene) is reflected. The default is full white, meaning objects reflect the maximum white light they can from Light objects.

Note
  This setting has no effect if dynamic lighting is disabled (see Pass::setLightingEnabled), or if this is a programmable pass.

## ◆ setDiffuse() [2/2]

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

Sets the diffuse colour reflectance properties of this pass.

Remarks
  The base colour of a pass is determined by how much red, green and blue light is reflects (provided texture layer #0 has a blend mode other than LBO_REPLACE). This property determines how much diffuse light (light from instances of the Light class in the scene) is reflected. The default is full white, meaning objects reflect the maximum white light they can from Light objects.

Note
  This setting has no effect if dynamic lighting is disabled (see Pass::setLightingEnabled), or if this is a programmable pass.

## ◆ setEmissive() [1/2]

void Ogre::Pass::setEmissive | ( | const ColourValue & | emissive | ) |
| inline

Sets the amount of self-illumination an object has.

See also
  setSelfIllumination

## ◆ setEmissive() [2/2]

void Ogre::Pass::setEmissive | ( | Real | red,
|  | Real | green,
|  | Real | blue
| ) |  |
| inline

Sets the amount of self-illumination an object has.

See also
  setSelfIllumination

## ◆ setFog()

void Ogre::Pass::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 this pass.

Remarks
  Fogging is an effect that is applied as polys are rendered. Sometimes, you want fog to be applied to an entire scene. Other times, you want it to be applied to a few polygons only. This pass-level specification of fog parameters lets you easily manage both.

  The SceneManager class also has a setFog method which applies scene-level fog. This method lets you change the fog behaviour for this pass compared to the standard scene-level fog.

Parameters

  overrideScene | If true, you authorise this pass to override the scene's fog params with it's own settings. If you specify false, so other parameters are necessary, and this is the default behaviour for passes.
  mode | Only applicable if overrideScene is true. You can disable fog which is turned on for the rest of the scene by specifying FOG_NONE. Otherwise, set a pass-specific fog mode as defined in the enum FogMode.
  colour | The colour of the fog. Either set this to the same as your viewport background colour, or to blend in with a skydome or skybox.
  expDensity | The density of the fog in FOG_EXP or FOG_EXP2 mode, as a value between 0 and 1. The default is 0.001.
  linearStart | Distance in world units at which linear fog starts to encroach. Only applicable if mode is FOG_LINEAR.
  linearEnd | Distance in world units at which linear fog becomes completely opaque. Only applicable if mode is FOG_LINEAR.

## ◆ setFragmentProgram()

void Ogre::Pass::setFragmentProgram | ( | const String & | name,
|  | bool | resetParams = `true`
| ) |  |

Sets the details of the fragment program to use.

Remarks
  Only applicable to programmable passes, this sets the details of the fragment program to use in this pass. The program will not be loaded until the parent Material is loaded.

Parameters

  name | The name of the program - this must have been created using GpuProgramManager by the time that this Pass is loaded. If this parameter is blank, any fragment program in this pass is disabled.
  resetParams | If true, this will create a fresh set of parameters from the new program being linked, so if you had previously set parameters you will have to set them again. If you set this to false, you must be absolutely sure that the parameters match perfectly, and in the case of named parameters refers to the indexes underlying them, not just the names.

## ◆ setFragmentProgramParameters()

void Ogre::Pass::setFragmentProgramParameters | ( | GpuProgramParametersSharedPtr | params | ) |

Sets the fragment program parameters.

Remarks
  Only applicable to programmable passes.

## ◆ setGeometryProgram()

void Ogre::Pass::setGeometryProgram | ( | const String & | name,
|  | bool | resetParams = `true`
| ) |  |

Sets the details of the geometry program to use.

Remarks
  Only applicable to programmable passes, this sets the details of the geometry program to use in this pass. The program will not be loaded until the parent Material is loaded.

Parameters

  name | The name of the program - this must have been created using GpuProgramManager by the time that this Pass is loaded. If this parameter is blank, any geometry program in this pass is disabled.
  resetParams | If true, this will create a fresh set of parameters from the new program being linked, so if you had previously set parameters you will have to set them again. If you set this to false, you must be absolutely sure that the parameters match perfectly, and in the case of named parameters refers to the indexes underlying them, not just the names.

## ◆ setGeometryProgramParameters()

void Ogre::Pass::setGeometryProgramParameters | ( | GpuProgramParametersSharedPtr | params | ) |

Sets the geometry program parameters.

Remarks
  Only applicable to programmable passes.

## ◆ setIteratePerLight()

void Ogre::Pass::setIteratePerLight | ( | bool | enabled,
|  | bool | onlyForOneLightType = `true`,
|  | Light::LightTypes | lightType = `Light::LT_POINT`
| ) |  |

Sets whether or not this pass should iterate per light or number of lights which can affect the object being rendered.

Remarks
  The default behaviour for a pass (when this option is 'false'), is for a pass to be rendered only once (or the number of times set in setPassIterationCount), with all the lights which could affect this object set at the same time (up to the maximum lights allowed in the render system, which is typically 8).

  Setting this option to 'true' changes this behaviour, such that instead of trying to issue render this pass once per object, it is run per light, or for a group of 'n' lights each time which can affect this object, the number of times set in setPassIterationCount (default is once). In this case, only light index 0 is ever used, and is a different light every time the pass is issued, up to the total number of lights which is affecting this object. This has 2 advantages:
  - There is no limit on the number of lights which can be supported
  - It's easier to write vertex / fragment programs for this because a single program can be used for any number of lights
  However, this technique is more expensive, and typically you will want an additional ambient pass, because if no lights are affecting the object it will not be rendered at all, which will look odd even if ambient light is zero (imagine if there are lit objects behind it - the objects silhouette would not show up). Therefore, use this option with care, and you would be well advised to provide a less expensive fallback technique for use in the distance.

Note
  The number of times this pass runs is still limited by the maximum number of lights allowed as set in setMaxSimultaneousLights, so you will never get more passes than this. Also, the iteration is started from the 'start light' as set in Pass::setStartLight, and the number of passes is the number of lights to iterate over divided by the number of lights per iteration (default 1, set by setLightCountPerIteration).

Parameters

  enabled | Whether this feature is enabled
  onlyForOneLightType | If true, the pass will only be run for a single type of light, other light types will be ignored.
  lightType | The single light type which will be considered for this pass

## ◆ setLightClipPlanesEnabled()

void Ogre::Pass::setLightClipPlanesEnabled | ( | bool | enabled | ) |
| inline

Gets whether or not this pass will be clipped by user clips planes bounding the area covered by the light.

Remarks
  In order to cut down on the geometry set up to render this pass when you have a single fixed-range light being rendered through it, you can enable this option to request that during triangle setup, clip planes are defined to bound the range of the light. In the case of a point light these planes form a cube, and in the case of a spotlight they form a pyramid. Directional lights are never clipped.

  This option is only likely to be useful for multipass additive lighting algorithms, where the scene has already been 'seeded' with an ambient pass and this pass is just adding light in affected areas. In addition, it will only be honoured if there is exactly one non-directional light being used in this pass. Also, these clip planes override any user clip planes set on Camera.

Note
  When using SHADOWTYPE_STENCIL_ADDITIVE or SHADOWTYPE_TEXTURE_ADDITIVE, this option is automatically used for all per-light passes if you enable SceneManager::setShadowUseLightClipPlanes and does not need to be specified. It is disabled by default since clip planes have a cost of their own which may not always exceed the benefits they give you.

## ◆ setLightCountPerIteration()

void Ogre::Pass::setLightCountPerIteration | ( | unsigned short | c | ) |

If light iteration is enabled, determine the number of lights per iteration.

Remarks
  The default for this setting is 1, so if you enable light iteration (Pass::setIteratePerLight), the pass is rendered once per light. If you set this value higher, the passes will occur once per 'n' lights. The start of the iteration is set by Pass::setStartLight and the end by Pass::setMaxSimultaneousLights.

## ◆ setLightMask()

void Ogre::Pass::setLightMask | ( | uint32 | mask | ) |

Sets the light mask which can be matched to specific light flags to be handled by this pass.

## ◆ setLightScissoringEnabled()

void Ogre::Pass::setLightScissoringEnabled | ( | bool | enabled | ) |
| inline

Sets whether or not this pass will be clipped by a scissor rectangle encompassing the lights that are being used in it.

Remarks
  In order to cut down on fillrate when you have a number of fixed-range lights in the scene, you can enable this option to request that during rendering, only the region of the screen which is covered by the lights is rendered. This region is the screen-space rectangle covering the union of the spheres making up the light ranges. Directional lights are ignored for this.

  This is only likely to be useful for multipass additive lighting algorithms, where the scene has already been 'seeded' with an ambient pass and this pass is just adding light in affected areas.

Note
  When using SHADOWTYPE_STENCIL_ADDITIVE or SHADOWTYPE_TEXTURE_ADDITIVE, this option is implicitly used for all per-light passes and does not need to be specified. If you are not using shadows or are using a modulative or an integrated shadow technique then this could be useful.

## ◆ setMacroblock()

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

Changes the current macroblock for a new one. Pointer can't be null.

## ◆ setMaxSimultaneousLights()

void Ogre::Pass::setMaxSimultaneousLights | ( | unsigned short | maxLights | ) |

Sets the maximum number of lights to be used by this pass.

Remarks
  During rendering, if lighting is enabled (or if the pass uses an automatic program parameter based on a light) the engine will request the nearest lights to the object being rendered in order to work out which ones to use. This parameter sets the limit on the number of lights which should apply to objects rendered with this pass.

## ◆ setName()

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

## ◆ setPassIterationCount()

void Ogre::Pass::setPassIterationCount | ( | const size_t | count | ) |
| inline

set the number of iterations that this pass should perform when doing fast multi pass operation.

Remarks
  Only applicable for programmable passes.

Parameters

  count | number of iterations to perform fast multi pass operations. A value greater than 1 will cause the pass to be executed count number of times without changing the render state. This is very useful for passes that use programmable shaders that have to iterate more than once but don't need a render state change. Using multi pass can dramatically speed up rendering for materials that do things like fur, blur. A value of 1 turns off multi pass operation and the pass does the normal pass operation.

## ◆ setPointAttenuation()

void Ogre::Pass::setPointAttenuation | ( | bool | enabled,
|  | Real | constant = `0.0f`,
|  | Real | linear = `1.0f`,
|  | Real | quadratic = `0.0f`
| ) |  |

Sets how points are attenuated with distance.

Remarks
  When performing point rendering or point sprite rendering, point size can be attenuated with distance. The equation for doing this is attenuation = 1 / (constant + linear * dist + quadratic * d^2).

  For example, to disable distance attenuation (constant screensize) you would set constant to 1, and linear and quadratic to 0. A standard perspective attenuation would be 0, 1, 0 respectively.

Note
  The resulting size is clamped to the minimum and maximum point size.

Parameters

  enabled | Whether point attenuation is enabled
  constant,linear,quadratic | Parameters to the attenuation function defined above

## ◆ setPointMaxSize()

void Ogre::Pass::setPointMaxSize | ( | Real | max | ) |

Set the maximum point size, when point attenuation is in use.

Remarks
  Setting this to 0 indicates the max size supported by the card.

## ◆ setPointMinSize()

void Ogre::Pass::setPointMinSize | ( | Real | min | ) |

Set the minimum point size, when point attenuation is in use.

## ◆ setPointSize()

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

Sets the point size of this pass.

Remarks
  This setting allows you to change the size of points when rendering a point list, or a list of point sprites. The interpretation of this command depends on the Pass::setPointSizeAttenuation option - if it is off (the default), the point size is in screen pixels, if it is on, it expressed as normalised screen coordinates (1.0 is the height of the screen) when the point is at the origin.

Note
  Some drivers have an upper limit on the size of points they support
  - this can even vary between APIs on the same card! Don't rely on point sizes that cause the point sprites to get very large on screen, since they may get clamped on some cards. Upper sizes can range from 64 to 256 pixels.

## ◆ setPointSpritesEnabled()

void Ogre::Pass::setPointSpritesEnabled | ( | bool | enabled | ) |

Sets whether or not rendering points using OT_POINT_LIST will render point sprites (textured quads) or plain points (dots).

Parameters

  enabled | True enables point sprites, false returns to normal point rendering.

## ◆ setPolygonModeOverrideable()

virtual void Ogre::Pass::setPolygonModeOverrideable | ( | bool | override | ) |
| inlinevirtual

Sets whether this pass's chosen detail level can be overridden (downgraded) by the camera setting.

Parameters

  override | true means that a lower camera detail will override this pass's detail level, false means it won't (default true).

## ◆ setSamplerblock()

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

Set samplerblock for every texture unit.

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 TextureUnitState instance and set the property there.

See also
  TextureUnitState::setSamplerblock

## ◆ setSelfIllumination() [1/2]

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

Sets the amount of self-illumination an object has.

Remarks
  If an object is self-illuminating, it does not need external sources to light it, ambient or otherwise. It's like the object has it's own personal ambient light. This property is rarely useful since you can already specify per-pass ambient light, but is here for completeness.

Note
  This setting has no effect if dynamic lighting is disabled (see Pass::setLightingEnabled), or if this is a programmable pass.

## ◆ setSelfIllumination() [2/2]

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

Sets the amount of self-illumination an object has.

Remarks
  If an object is self-illuminating, it does not need external sources to light it, ambient or otherwise. It's like the object has it's own personal ambient light. This property is rarely useful since you can already specify per-pass ambient light, but is here for completeness.

Note
  This setting has no effect if dynamic lighting is disabled (see Pass::setLightingEnabled), or if this is a programmable pass.

## ◆ setShadingMode()

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

Sets the type of light shading required.

Note
  The default shading method is Gouraud shading.

## ◆ setShadowCasterFragmentProgram()

void Ogre::Pass::setShadowCasterFragmentProgram | ( | const String & | name | ) |

Sets the details of the fragment program to use when rendering as a shadow caster.

Remarks
  Texture-based shadows require that the caster is rendered to a texture in a solid colour (the shadow colour in the case of modulative texture shadows). Whilst Ogre can arrange this for the fixed function pipeline, passes which use vertex programs might need the vertex programs still to run in order to preserve any deformation etc that it does. However, lighting calculations must be a lot simpler, with only the ambient colour being used (which the engine will ensure is bound to the shadow colour).

  Therefore, it is up to implementors of vertex programs to provide an alternative vertex program which can be used to render the object to a shadow texture. Do all the same vertex transforms, but set the colour of the vertex to the ambient colour, as bound using the standard auto parameter binding mechanism.

Note
  Some vertex programs will work without doing this, because Ogre ensures that all lights except for ambient are set black. However, the chances are that your vertex program is doing a lot of unnecessary work in this case, since the other lights are having no effect, and it is good practice to supply an alternative.
  This is only applicable to programmable passes.

  The default behaviour is for Ogre to switch to fixed-function rendering if an explicit fragment program alternative is not set.

## ◆ setShadowCasterFragmentProgramParameters()

void Ogre::Pass::setShadowCasterFragmentProgramParameters | ( | GpuProgramParametersSharedPtr | params | ) |

Sets the fragment program parameters for rendering as a shadow caster.

Remarks
  Only applicable to programmable passes, and this particular call is designed for low-level programs; use the named parameter methods for setting high-level program parameters.

## ◆ setShadowCasterVertexProgram()

void Ogre::Pass::setShadowCasterVertexProgram | ( | const String & | name | ) |

Sets the details of the vertex program to use when rendering as a shadow caster.

Remarks
  Texture-based shadows require that the caster is rendered to a texture in a solid colour (the shadow colour in the case of modulative texture shadows). Whilst Ogre can arrange this for the fixed function pipeline, passes which use vertex programs might need the vertex programs still to run in order to preserve any deformation etc that it does. However, lighting calculations must be a lot simpler, with only the ambient colour being used (which the engine will ensure is bound to the shadow colour).

  Therefore, it is up to implementors of vertex programs to provide an alternative vertex program which can be used to render the object to a shadow texture. Do all the same vertex transforms, but set the colour of the vertex to the ambient colour, as bound using the standard auto parameter binding mechanism.

Note
  Some vertex programs will work without doing this, because Ogre ensures that all lights except for ambient are set black. However, the chances are that your vertex program is doing a lot of unnecessary work in this case, since the other lights are having no effect, and it is good practice to supply an alternative.
  This is only applicable to programmable passes.

  The default behaviour is for Ogre to switch to fixed-function rendering if an explicit vertex program alternative is not set.

## ◆ setShadowCasterVertexProgramParameters()

void Ogre::Pass::setShadowCasterVertexProgramParameters | ( | GpuProgramParametersSharedPtr | params | ) |

Sets the vertex program parameters for rendering as a shadow caster.

Remarks
  Only applicable to programmable passes, and this particular call is designed for low-level programs; use the named parameter methods for setting high-level program parameters.

## ◆ setShininess()

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

Sets the shininess of the pass, affecting the size of specular highlights.

Note
  This setting has no effect if dynamic lighting is disabled (see Pass::setLightingEnabled), or if this is a programmable pass.

## ◆ setSpecular() [1/2]

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

Sets the specular colour reflectance properties of this pass.

Remarks
  The base colour of a pass is determined by how much red, green and blue light is reflects (provided texture layer #0 has a blend mode other than LBO_REPLACE). This property determines how much specular light (highlights from instances of the Light class in the scene) is reflected. The default is to reflect no specular light.

Note
  The size of the specular highlights is determined by the separate 'shininess' property.
  This setting has no effect if dynamic lighting is disabled (see Pass::setLightingEnabled), or if this is a programmable pass.

## ◆ setSpecular() [2/2]

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

Sets the specular colour reflectance properties of this pass.

Remarks
  The base colour of a pass is determined by how much red, green and blue light is reflects (provided texture layer #0 has a blend mode other than LBO_REPLACE). This property determines how much specular light (highlights from instances of the Light class in the scene) is reflected. The default is to reflect no specular light.

Note
  The size of the specular highlights is determined by the separate 'shininess' property.
  This setting has no effect if dynamic lighting is disabled (see Pass::setLightingEnabled), or if this is a programmable pass.

## ◆ setStartLight()

void Ogre::Pass::setStartLight | ( | unsigned short | startLight | ) |

Sets the light index that this pass will start at in the light list.

Remarks
  Normally the lights passed to a pass will start from the beginning of the light list for this object. This option allows you to make this pass start from a higher light index, for example if one of your earlier passes could deal with lights 0-3, and this pass dealt with lights 4+. This option also has an interaction with pass iteration, in that if you choose to iterate this pass per light too, the iteration will only begin from light 4.

## ◆ setTessellationDomainProgram()

void Ogre::Pass::setTessellationDomainProgram | ( | const String & | name,
|  | bool | resetParams = `true`
| ) |  |

Sets the details of the Tessellation domain program to use.

Remarks
  Only applicable to programmable passes, this sets the details of the Tessellation domain program to use in this pass. The program will not be loaded until the parent Material is loaded.

Parameters

  name | The name of the program - this must have been created using GpuProgramManager by the time that this Pass is loaded. If this parameter is blank, any Tessellation domain program in this pass is disabled.
  resetParams | If true, this will create a fresh set of parameters from the new program being linked, so if you had previously set parameters you will have to set them again. If you set this to false, you must be absolutely sure that the parameters match perfectly, and in the case of named parameters refers to the indexes underlying them, not just the names.

## ◆ setTessellationDomainProgramParameters()

void Ogre::Pass::setTessellationDomainProgramParameters | ( | GpuProgramParametersSharedPtr | params | ) |

Sets the Tessellation Domain program parameters.

Remarks
  Only applicable to programmable passes.

## ◆ setTessellationHullProgram()

void Ogre::Pass::setTessellationHullProgram | ( | const String & | name,
|  | bool | resetParams = `true`
| ) |  |

Support for shader model 5.0, hull and domain shaders.

Sets the details of the Tessellation control program to use.

Remarks
  Only applicable to programmable passes, this sets the details of the Tessellation Hull program to use in this pass. The program will not be loaded until the parent Material is loaded.

Parameters

  name | The name of the program - this must have been created using GpuProgramManager by the time that this Pass is loaded. If this parameter is blank, any Tessellation Hull program in this pass is disabled.
  resetParams | If true, this will create a fresh set of parameters from the new program being linked, so if you had previously set parameters you will have to set them again. If you set this to false, you must be absolutely sure that the parameters match perfectly, and in the case of named parameters refers to the indexes underlying them, not just the names.

## ◆ setTessellationHullProgramParameters()

void Ogre::Pass::setTessellationHullProgramParameters | ( | GpuProgramParametersSharedPtr | params | ) |

Sets the Tessellation Hull program parameters.

Remarks
  Only applicable to programmable passes.

## ◆ setVertexColourTracking()

void Ogre::Pass::setVertexColourTracking | ( | TrackVertexColourType | tracking | ) |

Sets which material properties follow the vertex colour.

## ◆ setVertexProgram()

void Ogre::Pass::setVertexProgram | ( | const String & | name,
|  | bool | resetParams = `true`
| ) |  |

Sets the details of the vertex program to use.

Remarks
  Only applicable to programmable passes, this sets the details of the vertex program to use in this pass. The program will not be loaded until the parent Material is loaded.

Parameters

  name | The name of the program - this must have been created using GpuProgramManager by the time that this Pass is loaded. If this parameter is blank, any vertex program in this pass is disabled.
  resetParams | If true, this will create a fresh set of parameters from the new program being linked, so if you had previously set parameters you will have to set them again. If you set this to false, you must be absolutely sure that the parameters match perfectly, and in the case of named parameters refers to the indexes underlying them, not just the names.

## ◆ setVertexProgramParameters()

void Ogre::Pass::setVertexProgramParameters | ( | GpuProgramParametersSharedPtr | params | ) |

Sets the vertex program parameters.

Remarks
  Only applicable to programmable passes, and this particular call is designed for low-level programs; use the named parameter methods for setting high-level program parameters.

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

- OgrePass.h