OGRE  2.0
Object-Oriented Graphics Rendering Engine
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
OgrePass.h
Go to the documentation of this file.
1 /*
2 -----------------------------------------------------------------------------
3 This source file is part of OGRE
4 (Object-oriented Graphics Rendering Engine)
5 For the latest info, see http://www.ogre3d.org
6 
7 Copyright (c) 2000-2014 Torus Knot Software Ltd
8 
9 Permission is hereby granted, free of charge, to any person obtaining a copy
10 of this software and associated documentation files (the "Software"), to deal
11 in the Software without restriction, including without limitation the rights
12 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13 copies of the Software, and to permit persons to whom the Software is
14 furnished to do so, subject to the following conditions:
15 
16 The above copyright notice and this permission notice shall be included in
17 all copies or substantial portions of the Software.
18 
19 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
25 THE SOFTWARE.
26 -----------------------------------------------------------------------------
27 */
28 #ifndef __Pass_H__
29 #define __Pass_H__
30 
31 #include "OgrePrerequisites.h"
32 #include "OgreColourValue.h"
33 #include "OgreCommon.h"
34 #include "OgreLight.h"
35 #include "OgreTextureUnitState.h"
36 #include "OgreUserObjectBindings.h"
37 
38 namespace Ogre {
39 
48  {
57  };
58 
78  class _OgreExport Pass : public PassAlloc
79  {
80  public:
91  struct HashFunc
92  {
93  virtual uint32 operator()(const Pass* p) const = 0;
95  virtual ~HashFunc() {}
96  };
97  protected:
99  unsigned short mIndex;
103  //-------------------------------------------------------------------------
104  // Colour properties, only applicable in fixed-function passes
111  //-------------------------------------------------------------------------
112 
113  //-------------------------------------------------------------------------
114  // Blending factors
119 
120  // Used to determine if separate alpha blending should be used for color and alpha channels
122 
123  //-------------------------------------------------------------------------
124  // Blending operations
127 
130 
131  //-------------------------------------------------------------------------
132 
133  //-------------------------------------------------------------------------
134  // Depth buffer settings
141 
144 
145  // Alpha reject settings
147  unsigned char mAlphaRejectVal;
149 
154  //-------------------------------------------------------------------------
155 
156  //-------------------------------------------------------------------------
157  // Culling mode
160  //-------------------------------------------------------------------------
161 
165  unsigned short mMaxSimultaneousLights;
167  unsigned short mStartLight;
171  unsigned short mLightsPerIteration;
177 
185  //-------------------------------------------------------------------------
186  // Fog
193  //-------------------------------------------------------------------------
194 
198 
226  Real mPointAttenuationCoeffs[3];
227  // TU Content type lookups
238 
239 
241  void _getBlendFlags(SceneBlendType type, SceneBlendFactor& source, SceneBlendFactor& dest);
242 
243  public:
245  protected:
252  public:
253  OGRE_STATIC_MUTEX(msDirtyHashListMutex);
254  OGRE_STATIC_MUTEX(msPassGraveyardMutex);
255  OGRE_MUTEX(mTexUnitChangeMutex);
256  OGRE_MUTEX(mGpuProgramChangeMutex);
258  Pass(Technique* parent, unsigned short index);
260  Pass(Technique* parent, unsigned short index, const Pass& oth );
262  Pass& operator=(const Pass& oth);
263  virtual ~Pass();
264 
266  bool isProgrammable(void) const { return mVertexProgramUsage || mFragmentProgramUsage || mGeometryProgramUsage ||
267  mTessellationHullProgramUsage || mTessellationDomainProgramUsage || mComputeProgramUsage; }
268 
270  bool hasVertexProgram(void) const { return mVertexProgramUsage != NULL; }
272  bool hasFragmentProgram(void) const { return mFragmentProgramUsage != NULL; }
274  bool hasGeometryProgram(void) const { return mGeometryProgramUsage != NULL; }
276  bool hasTessellationHullProgram(void) const { return mTessellationHullProgramUsage != NULL; }
278  bool hasTessellationDomainProgram(void) const { return mTessellationDomainProgramUsage != NULL; }
280  bool hasComputeProgram(void) const { return mComputeProgramUsage != NULL; }
282  bool hasShadowCasterVertexProgram(void) const { return mShadowCasterVertexProgramUsage != NULL; }
284  bool hasShadowCasterFragmentProgram(void) const { return mShadowCasterFragmentProgramUsage != NULL; }
285 
286  size_t calculateSize(void) const;
287 
289  unsigned short getIndex(void) const { return mIndex; }
290  /* Set the name of the pass
291  @remarks
292  The name of the pass is optional. Its useful in material scripts where a material could inherit
293  from another material and only want to modify a particular pass.
294  */
295  void setName(const String& name);
297  const String& getName(void) const { return mName; }
298 
310  void setAmbient(Real red, Real green, Real blue);
311 
324  void setAmbient(const ColourValue& ambient);
325 
336  void setDiffuse(Real red, Real green, Real blue, Real alpha);
337 
348  void setDiffuse(const ColourValue& diffuse);
349 
362  void setSpecular(Real red, Real green, Real blue, Real alpha);
363 
376  void setSpecular(const ColourValue& specular);
377 
383  void setShininess(Real val);
384 
394  void setSelfIllumination(Real red, Real green, Real blue);
395 
400  void setEmissive(Real red, Real green, Real blue)
401  {
402  setSelfIllumination(red, green, blue);
403  }
404 
414  void setSelfIllumination(const ColourValue& selfIllum);
415 
420  void setEmissive(const ColourValue& emissive)
421  {
422  setSelfIllumination(emissive);
423  }
424 
427  void setVertexColourTracking(TrackVertexColourType tracking);
428 
434  Real getPointSize(void) const;
435 
451  void setPointSize(Real ps);
452 
458  void setPointSpritesEnabled(bool enabled);
459 
463  bool getPointSpritesEnabled(void) const;
464 
481  void setPointAttenuation(bool enabled,
482  Real constant = 0.0f, Real linear = 1.0f, Real quadratic = 0.0f);
483 
485  bool isPointAttenuationEnabled(void) const;
486 
488  Real getPointAttenuationConstant(void) const;
490  Real getPointAttenuationLinear(void) const;
492  Real getPointAttenuationQuadratic(void) const;
493 
495  void setPointMinSize(Real min);
497  Real getPointMinSize(void) const;
501  void setPointMaxSize(Real max);
505  Real getPointMaxSize(void) const;
506 
509  const ColourValue& getAmbient(void) const;
510 
513  const ColourValue& getDiffuse(void) const;
514 
517  const ColourValue& getSpecular(void) const;
518 
521  const ColourValue& getSelfIllumination(void) const;
522 
527  const ColourValue& getEmissive(void) const
528  {
529  return getSelfIllumination();
530  }
531 
534  Real getShininess(void) const;
535 
538  TrackVertexColourType getVertexColourTracking(void) const;
539 
544  TextureUnitState* createTextureUnitState(void);
555  TextureUnitState* createTextureUnitState( const String& textureName, unsigned short texCoordSet = 0);
561  void addTextureUnitState(TextureUnitState* state);
564  TextureUnitState* getTextureUnitState( size_t index );
568  TextureUnitState* getTextureUnitState(const String& name);
571  const TextureUnitState* getTextureUnitState( size_t index ) const;
575  const TextureUnitState* getTextureUnitState(const String& name) const;
576 
583  unsigned short getTextureUnitStateIndex(const TextureUnitState* state) const;
584 
587  TextureUnitStateIterator getTextureUnitStateIterator(void);
588 
591  ConstTextureUnitStateIterator getTextureUnitStateIterator(void) const;
592 
597  void removeTextureUnitState(unsigned short index);
598 
601  void removeAllTextureUnitStates(void);
602 
605  unsigned short getNumTextureUnitStates(void) const
606  {
607  return static_cast<unsigned short>(mTextureUnitStates.size());
608  }
609 
610  size_t getNumShadowContentTextures(void) const { return mShadowContentTypeLookup.size(); }
611 
613  void recreateShadowContentTypeLookup(void);
614 
619  void insertShadowContentTypeLookup( size_t textureUnitIndex );
620 
624  void removeShadowContentTypeLookup( size_t textureUnitIndex );
625 
642  void setSceneBlending( const SceneBlendType sbt );
643 
662  void setSeparateSceneBlending( const SceneBlendType sbt, const SceneBlendType sbta );
663 
686  void setSceneBlending( const SceneBlendFactor sourceFactor, const SceneBlendFactor destFactor);
687 
714  void setSeparateSceneBlending( const SceneBlendFactor sourceFactor, const SceneBlendFactor destFactor, const SceneBlendFactor sourceFactorAlpha, const SceneBlendFactor destFactorAlpha );
715 
717  bool hasSeparateSceneBlending() const;
718 
721  SceneBlendFactor getSourceBlendFactor() const;
722 
725  SceneBlendFactor getDestBlendFactor() const;
726 
729  SceneBlendFactor getSourceBlendFactorAlpha() const;
730 
733  SceneBlendFactor getDestBlendFactorAlpha() const;
734 
745  void setSceneBlendingOperation(SceneBlendOperation op);
746 
760  void setSeparateSceneBlendingOperation(SceneBlendOperation op, SceneBlendOperation alphaOp);
761 
763  bool hasSeparateSceneBlendingOperations() const;
764 
766  SceneBlendOperation getSceneBlendingOperation() const;
767 
769  SceneBlendOperation getSceneBlendingOperationAlpha() const;
770 
772  bool isTransparent(void) const;
773 
785  void setDepthCheckEnabled(bool enabled);
786 
791  bool getDepthCheckEnabled(void) const;
792 
803  void setDepthWriteEnabled(bool enabled);
804 
809  bool getDepthWriteEnabled(void) const;
810 
818  void setDepthFunction( CompareFunction func );
823  CompareFunction getDepthFunction(void) const;
824 
835  void setColourWriteEnabled(bool enabled);
837  bool getColourWriteEnabled(void) const;
838 
852  void setCullingMode( CullingMode mode );
853 
856  CullingMode getCullingMode(void) const;
857 
871  void setManualCullingMode( ManualCullingMode mode );
872 
877  ManualCullingMode getManualCullingMode(void) const;
878 
887  void setLightingEnabled(bool enabled);
888 
891  bool getLightingEnabled(void) const;
892 
901  void setMaxSimultaneousLights(unsigned short maxLights);
903  unsigned short getMaxSimultaneousLights(void) const;
904 
915  void setStartLight(unsigned short startLight);
917  unsigned short getStartLight(void) const;
918 
920  void setLightMask(uint32 mask);
922  uint32 getLightMask() const;
923 
928  void setShadingMode( ShadeOptions mode );
929 
932  ShadeOptions getShadingMode(void) const;
933 
938  void setPolygonMode( PolygonMode mode );
939 
942  PolygonMode getPolygonMode(void) const;
943 
949  virtual void setPolygonModeOverrideable(bool override)
950  {
951  mPolygonModeOverrideable = override;
952  }
953 
957  virtual bool getPolygonModeOverrideable(void) const
958  {
959  return mPolygonModeOverrideable;
960  }
990  void setFog(
991  bool overrideScene,
992  FogMode mode = FOG_NONE,
993  const ColourValue& colour = ColourValue::White,
994  Real expDensity = 0.001, Real linearStart = 0.0, Real linearEnd = 1.0 );
995 
998  bool getFogOverride(void) const;
999 
1004  FogMode getFogMode(void) const;
1005 
1008  const ColourValue& getFogColour(void) const;
1009 
1014  Real getFogStart(void) const;
1015 
1020  Real getFogEnd(void) const;
1021 
1026  Real getFogDensity(void) const;
1027 
1047  void setDepthBias(float constantBias, float slopeScaleBias = 0.0f);
1048 
1050  float getDepthBiasConstant(void) const;
1052  float getDepthBiasSlopeScale(void) const;
1059  void setIterationDepthBias(float biasPerIteration);
1063  float getIterationDepthBias() const;
1064 
1074  void setAlphaRejectSettings(CompareFunction func, unsigned char value, bool alphaToCoverageEnabled = false);
1075 
1078  void setAlphaRejectFunction(CompareFunction func);
1079 
1082  void setAlphaRejectValue(unsigned char val);
1083 
1086  CompareFunction getAlphaRejectFunction(void) const { return mAlphaRejectFunc; }
1087 
1090  unsigned char getAlphaRejectValue(void) const { return mAlphaRejectVal; }
1091 
1099  void setAlphaToCoverageEnabled(bool enabled);
1100 
1103  bool isAlphaToCoverageEnabled() const { return mAlphaToCoverageEnabled; }
1104 
1117  void setTransparentSortingEnabled(bool enabled);
1118 
1121  bool getTransparentSortingEnabled(void) const;
1122 
1132  void setTransparentSortingForced(bool enabled);
1133 
1136  bool getTransparentSortingForced(void) const;
1137 
1180  void setIteratePerLight(bool enabled,
1181  bool onlyForOneLightType = true, Light::LightTypes lightType = Light::LT_POINT);
1182 
1184  bool getIteratePerLight(void) const { return mIteratePerLight; }
1186  bool getRunOnlyForOneLightType(void) const { return mRunOnlyForOneLightType; }
1189  Light::LightTypes getOnlyLightType() const { return mOnlyLightType; }
1190 
1200  void setLightCountPerIteration(unsigned short c);
1204  unsigned short getLightCountPerIteration(void) const;
1205 
1207  Technique* getParent(void) const { return mParent; }
1208 
1210  const String& getResourceGroup(void) const;
1211 
1228  void setVertexProgram(const String& name, bool resetParams = true);
1235  void setVertexProgramParameters(GpuProgramParametersSharedPtr params);
1237  const String& getVertexProgramName(void) const;
1239  GpuProgramParametersSharedPtr getVertexProgramParameters(void) const;
1241  const GpuProgramPtr& getVertexProgram(void) const;
1242 
1243 
1273  void setShadowCasterVertexProgram(const String& name);
1280  void setShadowCasterVertexProgramParameters(GpuProgramParametersSharedPtr params);
1282  const String& getShadowCasterVertexProgramName(void) const;
1284  GpuProgramParametersSharedPtr getShadowCasterVertexProgramParameters(void) const;
1287  const GpuProgramPtr& getShadowCasterVertexProgram(void) const;
1288 
1318  void setShadowCasterFragmentProgram(const String& name);
1325  void setShadowCasterFragmentProgramParameters(GpuProgramParametersSharedPtr params);
1327  const String& getShadowCasterFragmentProgramName(void) const;
1329  GpuProgramParametersSharedPtr getShadowCasterFragmentProgramParameters(void) const;
1332  const GpuProgramPtr& getShadowCasterFragmentProgram(void) const;
1333 
1350  void setFragmentProgram(const String& name, bool resetParams = true);
1355  void setFragmentProgramParameters(GpuProgramParametersSharedPtr params);
1357  const String& getFragmentProgramName(void) const;
1359  GpuProgramParametersSharedPtr getFragmentProgramParameters(void) const;
1361  const GpuProgramPtr& getFragmentProgram(void) const;
1362 
1379  void setGeometryProgram(const String& name, bool resetParams = true);
1384  void setGeometryProgramParameters(GpuProgramParametersSharedPtr params);
1386  const String& getGeometryProgramName(void) const;
1388  GpuProgramParametersSharedPtr getGeometryProgramParameters(void) const;
1390  const GpuProgramPtr& getGeometryProgram(void) const;
1391 
1403  Pass* _split(unsigned short numUnits);
1404 
1406  void _notifyIndex(unsigned short index);
1407 
1409  void _prepare(void);
1411  void _unprepare(void);
1413  void _load(void);
1415  void _unload(void);
1417  bool isLoaded(void) const;
1418 
1425  uint32 getHash(void) const { return mHash; }
1427  void _dirtyHash(void);
1434  void _recalculateHash(void);
1436  void _notifyNeedsRecompile(void);
1437 
1442  void _updateAutoParams(const AutoParamDataSource* source, uint16 variabilityMask) const;
1443 
1450  size_t _getTextureUnitWithContentTypeIndex( TextureUnitState::ContentType contentType,
1451  size_t index) const;
1452 
1461  void setTextureFiltering(TextureFilterOptions filterType);
1470  void setTextureAnisotropy(unsigned int maxAniso);
1482  void setNormaliseNormals(bool normalise) { mNormaliseNormals = normalise; }
1483 
1485  bool getNormaliseNormals(void) const {return mNormaliseNormals; }
1486 
1490  static const PassSet& getDirtyHashList(void)
1491  { return msDirtyHashList; }
1494  static const PassSet& getPassGraveyard(void)
1495  { return msPassGraveyard; }
1503  static void clearDirtyHashList(void);
1504 
1506  static void processPendingPassUpdates(void);
1507 
1509  void queueForDeletion(void);
1510 
1513  bool isAmbientOnly(void) const;
1514 
1528  void setPassIterationCount(const size_t count) { mPassIterationCount = count; }
1529 
1532  size_t getPassIterationCount(void) const { return mPassIterationCount; }
1533 
1545  bool applyTextureAliases(const AliasTextureNamePairList& aliasList, const bool apply = true) const;
1546 
1567  void setLightScissoringEnabled(bool enabled) { mLightScissoring = enabled; }
1571  bool getLightScissoringEnabled() const { return mLightScissoring; }
1572 
1596  void setLightClipPlanesEnabled(bool enabled) { mLightClipPlanes = enabled; }
1600  bool getLightClipPlanesEnabled() const { return mLightClipPlanes; }
1601 
1623  void setIlluminationStage(IlluminationStage is) { mIlluminationStage = is; }
1625  IlluminationStage getIlluminationStage() const { return mIlluminationStage; }
1630  {
1637  MIN_GPU_PROGRAM_CHANGE
1638  };
1651  static void setHashFunction(BuiltinHashFunction builtin);
1652 
1664  static void setHashFunction(HashFunc* hashFunc) { msHashFunc = hashFunc; }
1665 
1668  static HashFunc* getHashFunction(void) { return msHashFunc; }
1669 
1672  static HashFunc* getBuiltinHashFunction(BuiltinHashFunction builtin);
1673 
1678  UserObjectBindings& getUserObjectBindings() { return mUserObjectBindings; }
1679 
1684  const UserObjectBindings& getUserObjectBindings() const { return mUserObjectBindings; }
1685 
1687 
1703  void setTessellationHullProgram(const String& name, bool resetParams = true);
1708  void setTessellationHullProgramParameters(GpuProgramParametersSharedPtr params);
1710  const String& getTessellationHullProgramName(void) const;
1712  GpuProgramParametersSharedPtr getTessellationHullProgramParameters(void) const;
1714  const GpuProgramPtr& getTessellationHullProgram(void) const;
1715 
1732  void setTessellationDomainProgram(const String& name, bool resetParams = true);
1737  void setTessellationDomainProgramParameters(GpuProgramParametersSharedPtr params);
1739  const String& getTessellationDomainProgramName(void) const;
1741  GpuProgramParametersSharedPtr getTessellationDomainProgramParameters(void) const;
1743  const GpuProgramPtr& getTessellationDomainProgram(void) const;
1744 
1761  void setComputeProgram(const String& name, bool resetParams = true);
1766  void setComputeProgramParameters(GpuProgramParametersSharedPtr params);
1768  const String& getComputeProgramName(void) const;
1770  GpuProgramParametersSharedPtr getComputeProgramParameters(void) const;
1772  const GpuProgramPtr& getComputeProgram(void) const;
1773  };
1774 
1784  struct IlluminationPass : public PassAlloc
1785  {
1793 
1795  };
1796 
1798 
1802 }
1803 
1804 #endif
size_t getNumShadowContentTextures(void) const
Definition: OgrePass.h:610
bool mSeparateBlendOperation
Determines if we should use separate blending operations for color and alpha channels.
Definition: OgrePass.h:129
ContentTypeLookup mShadowContentTypeLookup
Definition: OgrePass.h:229
bool hasVertexProgram(void) const
Returns true if this pass uses a programmable vertex pipeline.
Definition: OgrePass.h:270
void setEmissive(const ColourValue &emissive)
Sets the amount of self-illumination an object has.
Definition: OgrePass.h:420
bool mDepthWrite
Definition: OgrePass.h:136
virtual ~HashFunc()
Need virtual destructor in case subclasses use it.
Definition: OgrePass.h:95
ManualCullingMode
Manual culling modes based on vertex normals.
Definition: OgreCommon.h:181
float Real
Software floating point type.
Real mPointMinSize
Definition: OgrePass.h:221
GpuProgramUsage * mTessellationDomainProgramUsage
Tessellation domain program details.
Definition: OgrePass.h:212
unsigned int uint32
Definition: OgrePlatform.h:420
#define _OgreExport
Definition: OgrePlatform.h:255
bool mDepthCheck
Definition: OgrePass.h:135
bool mQueuedForDeletion
Is this pass queued for deletion?
Definition: OgrePass.h:216
static HashFunc * msHashFunc
The Pass hash functor.
Definition: OgrePass.h:251
bool hasShadowCasterFragmentProgram(void) const
Returns true if this pass uses a shadow caster fragment program.
Definition: OgrePass.h:284
bool mFogOverride
Definition: OgrePass.h:187
GpuProgramUsage * mComputeProgramUsage
Compute program details.
Definition: OgrePass.h:214
SceneBlendOperation mAlphaBlendOperation
Definition: OgrePass.h:126
set< Pass * >::type PassSet
Definition: OgrePass.h:244
FogMode
Fog modes.
Definition: OgreCommon.h:152
#define OGRE_MUTEX(name)
ColourValue mSpecular
Definition: OgrePass.h:107
const float & max(const float &a, const float &b)
Definition: OgreCommon.h:851
bool isProgrammable(void) const
Returns true if this pass is programmable i.e. includes either a vertex or fragment program...
Definition: OgrePass.h:266
String mName
Pass index.
Definition: OgrePass.h:100
bool mNormaliseNormals
Normalisation.
Definition: OgrePass.h:183
Class representing colour.
static const ColourValue White
GpuProgramUsage * mVertexProgramUsage
Vertex program details.
Definition: OgrePass.h:200
bool mLightClipPlanes
User clip planes for light?
Definition: OgrePass.h:233
const String & getName(void) const
Get the name of the pass.
Definition: OgrePass.h:297
vector< TextureUnitState * >::type TextureUnitStates
Storage of texture unit states.
Definition: OgrePass.h:196
SceneBlendOperation mBlendOperation
Definition: OgrePass.h:125
ConstVectorIterator< TextureUnitStates > ConstTextureUnitStateIterator
Definition: OgrePass.h:589
LightTypes
Defines the type of light.
Definition: OgreLight.h:79
static const PassSet & getDirtyHashList(void)
Static method to retrieve all the Passes which need their hash values recalculated.
Definition: OgrePass.h:1490
bool getRunOnlyForOneLightType(void) const
Does this pass run only for a single light type (if getIteratePerLight is true).
Definition: OgrePass.h:1186
SceneBlendType
Types of blending that you can specify between an object and the existing contents of the scene...
bool mRunOnlyForOneLightType
Should it only be run for a certain light type?
Definition: OgrePass.h:173
bool hasGeometryProgram(void) const
Returns true if this pass uses a programmable geometry pipeline.
Definition: OgrePass.h:274
Technique * getParent(void) const
Gets the parent Technique.
Definition: OgrePass.h:1207
GpuProgramUsage * mShadowCasterVertexProgramUsage
Vertex program details.
Definition: OgrePass.h:202
virtual bool getPolygonModeOverrideable(void) const
Gets whether this renderable's chosen detail level can be overridden (downgraded) by the camera setti...
Definition: OgrePass.h:957
Class representing an approach to rendering this particular Material.
Definition: OgreTechnique.h:50
Part of the rendering which occurs per light.
Definition: OgrePass.h:52
unsigned short mStartLight
Starting light index.
Definition: OgrePass.h:167
Part of the rendering which occurs without any kind of direct lighting.
Definition: OgrePass.h:50
IlluminationStage stage
Definition: OgrePass.h:1786
SceneBlendFactor
Blending factors for manually blending objects with the scene.
Try to minimise the number of texture changes.
Definition: OgrePass.h:1632
uint32 mLightMask
With a specific light mask?
Definition: OgrePass.h:176
bool mColourWrite
Colour buffer settings.
Definition: OgrePass.h:143
bool hasFragmentProgram(void) const
Returns true if this pass uses a programmable fragment pipeline.
Definition: OgrePass.h:272
bool mSeparateBlend
Definition: OgrePass.h:121
bool mTransparentSorting
Transparent depth sorting.
Definition: OgrePass.h:151
Class defining a single pass of a Technique (of a Material), i.e.
Definition: OgrePass.h:78
void setEmissive(Real red, Real green, Real blue)
Sets the amount of self-illumination an object has.
Definition: OgrePass.h:400
CullingMode
Hardware culling modes based on vertex winding.
Definition: OgreCommon.h:166
std::set< T, P, A > type
GpuProgramUsage * mGeometryProgramUsage
Geometry program details.
Definition: OgrePass.h:208
No fog. Duh.
Definition: OgreCommon.h:155
SceneBlendFactor mDestBlendFactor
Definition: OgrePass.h:116
static PassSet msPassGraveyard
The place where passes go to die.
Definition: OgrePass.h:249
const ColourValue & getEmissive(void) const
Gets the self illumination colour of the pass.
Definition: OgrePass.h:527
unsigned char mAlphaRejectVal
Definition: OgrePass.h:147
IlluminationStage getIlluminationStage() const
Get the manually assigned illumination stage, if any.
Definition: OgrePass.h:1625
void setIlluminationStage(IlluminationStage is)
Manually set which illumination stage this pass is a member of.
Definition: OgrePass.h:1623
bool hasTessellationHullProgram(void) const
Returns true if this pass uses a programmable tessellation control pipeline.
Definition: OgrePass.h:276
GpuProgramUsage * mFragmentProgramUsage
Fragment program details.
Definition: OgrePass.h:206
bool mLightScissoring
Scissoring for the light?
Definition: OgrePass.h:231
bool mAlphaToCoverageEnabled
Definition: OgrePass.h:148
SceneBlendFactor mDestBlendFactorAlpha
Definition: OgrePass.h:118
void setLightScissoringEnabled(bool enabled)
Sets whether or not this pass will be clipped by a scissor rectangle encompassing the lights that are...
Definition: OgrePass.h:1567
ShadeOptions
Light shading modes.
Definition: OgreCommon.h:144
SceneBlendFactor mSourceBlendFactor
Definition: OgrePass.h:115
uint32 mHash
Optional name for the pass.
Definition: OgrePass.h:101
Definition of a functor for calculating the hashcode of a Pass.
Definition: OgrePass.h:91
ColourValue mEmissive
Definition: OgrePass.h:108
void setLightClipPlanesEnabled(bool enabled)
Gets whether or not this pass will be clipped by user clips planes bounding the area covered by the l...
Definition: OgrePass.h:1596
CompareFunction getAlphaRejectFunction(void) const
Gets the alpha reject function.
Definition: OgrePass.h:1086
ManualCullingMode mManualCullMode
Definition: OgrePass.h:159
ColourValue mFogColour
Definition: OgrePass.h:189
bool getIteratePerLight(void) const
Does this pass run once for every light in range?
Definition: OgrePass.h:1184
size_t getPassIterationCount(void) const
Gets the pass iteration count value.
Definition: OgrePass.h:1532
CompareFunction mDepthFunc
Definition: OgrePass.h:137
Concrete IteratorWrapper for const access to the underlying container.
Superclass for all objects that wish to use custom memory allocators when their new / delete operator...
bool mIteratePerLight
Run this pass once per light?
Definition: OgrePass.h:169
bool mPolygonModeOverrideable
Definition: OgrePass.h:184
const float & min(const float &a, const float &b)
Definition: OgreCommon.h:846
This class makes the usage of a vertex and fragment programs (low-level or high-level), with a given set of parameters, explicit.
SceneBlendFactor mSourceBlendFactorAlpha
Definition: OgrePass.h:117
unsigned short mLightsPerIteration
Iterate per how many lights?
Definition: OgrePass.h:171
CompareFunction mAlphaRejectFunc
Definition: OgrePass.h:146
Light::LightTypes mOnlyLightType
Definition: OgrePass.h:174
BuiltinHashFunction
There are some default hash functions used to order passes so that render state changes are minimised...
Definition: OgrePass.h:1629
static void setHashFunction(HashFunc *hashFunc)
Set the hash function used for all passes.
Definition: OgrePass.h:1664
IlluminationStage
Categorisation of passes for the purpose of additive lighting.
Definition: OgrePass.h:47
void setPassIterationCount(const size_t count)
set the number of iterations that this pass should perform when doing fast multi pass operation...
Definition: OgrePass.h:1528
unsigned short mIndex
Definition: OgrePass.h:99
virtual void setPolygonModeOverrideable(bool override)
Sets whether this pass's chosen detail level can be overridden (downgraded) by the camera setting...
Definition: OgrePass.h:949
Pass * pass
The pass to use in this stage.
Definition: OgrePass.h:1788
bool mPointAttenuationEnabled
Definition: OgrePass.h:224
bool getNormaliseNormals(void) const
Returns true if this pass has auto-normalisation of normals set.
Definition: OgrePass.h:1485
const UserObjectBindings & getUserObjectBindings() const
Return an instance of user objects binding associated with this class.
Definition: OgrePass.h:1684
bool hasComputeProgram(void) const
Returns true if this pass uses a programmable compute pipeline.
Definition: OgrePass.h:280
uint32 getHash(void) const
Gets the 'hash' of this pass, ie a precomputed number to use for sorting.
Definition: OgrePass.h:1425
void setNormaliseNormals(bool normalise)
If set to true, this forces normals to be normalised dynamically by the hardware for this pass...
Definition: OgrePass.h:1482
VectorIterator< TextureUnitStates > TextureUnitStateIterator
Definition: OgrePass.h:585
Real mFogStart
Definition: OgrePass.h:190
unsigned short mMaxSimultaneousLights
Max simultaneous lights.
Definition: OgrePass.h:165
static const PassSet & getPassGraveyard(void)
Static method to retrieve all the Passes which are pending deletion.
Definition: OgrePass.h:1494
Real mPointSize
Point size, applies when not using per-vertex point size.
Definition: OgrePass.h:220
bool mPointSpritesEnabled
Definition: OgrePass.h:223
Struct recording a pass which can be used for a specific illumination stage.
Definition: OgrePass.h:1784
FogMode mFogMode
Definition: OgrePass.h:188
TextureUnitStates mTextureUnitStates
Definition: OgrePass.h:197
GpuProgramUsage * mTessellationHullProgramUsage
Tessellation hull program details.
Definition: OgrePass.h:210
bool hasShadowCasterVertexProgram(void) const
Returns true if this pass uses a shadow caster vertex program.
Definition: OgrePass.h:282
IlluminationStage mIlluminationStage
Illumination stage?
Definition: OgrePass.h:235
CullingMode mCullMode
Definition: OgrePass.h:158
unsigned char getAlphaRejectValue(void) const
Gets the alpha reject value.
Definition: OgrePass.h:1090
PolygonMode
The polygon mode to use when rasterising.
Definition: OgreCommon.h:210
Real mPointMaxSize
Definition: OgrePass.h:222
vector< IlluminationPass * >::type IlluminationPassList
Definition: OgrePass.h:1797
float mDepthBiasConstant
Definition: OgrePass.h:138
#define OGRE_STATIC_MUTEX(name)
size_t mPassIterationCount
Number of pass iterations to perform.
Definition: OgrePass.h:218
float mDepthBiasPerIteration
Definition: OgrePass.h:140
SceneBlendOperation
Blending operations controls how objects are blended into the scene.
ShadeOptions mShadeOptions
Shading options.
Definition: OgrePass.h:179
Pass * originalPass
The original pass which spawned this one.
Definition: OgrePass.h:1792
bool getLightClipPlanesEnabled() const
Gets whether or not this pass will be clipped by user clips planes bounding the area covered by the l...
Definition: OgrePass.h:1600
Real mFogDensity
Definition: OgrePass.h:192
_StringBase String
Definition: OgreCommon.h:53
Post-lighting rendering.
Definition: OgrePass.h:54
Technique * mParent
Definition: OgrePass.h:98
bool destroyOnShutdown
Whether this pass is one which should be deleted itself.
Definition: OgrePass.h:1790
unsigned short uint16
Definition: OgrePlatform.h:421
Real mFogEnd
Definition: OgrePass.h:191
float mDepthBiasSlopeScale
Definition: OgrePass.h:139
ColourValue mAmbient
Needs to be dirtied when next loaded.
Definition: OgrePass.h:105
Concrete IteratorWrapper for nonconst access to the underlying container.
map< String, String >::type AliasTextureNamePairList
Alias / Texture name pair (first = alias, second = texture name)
Definition: OgreCommon.h:583
bool hasTessellationDomainProgram(void) const
Returns true if this pass uses a programmable tessellation control pipeline.
Definition: OgrePass.h:278
Point light sources give off light equally in all directions, so require only position not direction...
Definition: OgreLight.h:82
CompareFunction
Comparison functions used for the depth/stencil buffer operations and others.
Definition: OgreCommon.h:74
Class representing the state of a single texture unit during a Pass of a Technique, of a Material.
UserObjectBindings mUserObjectBindings
User objects binding.
Definition: OgrePass.h:237
int TrackVertexColourType
An enumeration describing which material properties should track the vertex colours.
Definition: OgreCommon.h:221
bool mLightingEnabled
Lighting enabled?
Definition: OgrePass.h:163
PolygonMode mPolygonMode
Polygon mode.
Definition: OgrePass.h:181
GpuProgramUsage * mShadowCasterFragmentProgramUsage
Fragment program details.
Definition: OgrePass.h:204
static HashFunc * getHashFunction(void)
Get the hash function used for all passes.
Definition: OgrePass.h:1668
ContentType
Enum identifying the type of content this texture unit contains.
unsigned short getIndex(void) const
Gets the index of this Pass in the parent Technique.
Definition: OgrePass.h:289
Light::LightTypes getOnlyLightType() const
Gets the single light type this pass runs for if getIteratePerLight and getRunOnlyForOneLightType are...
Definition: OgrePass.h:1189
ColourValue mDiffuse
Definition: OgrePass.h:106
bool isAlphaToCoverageEnabled() const
Gets whether to use alpha to coverage (A2C) when blending alpha rejected values.
Definition: OgrePass.h:1103
Not determined.
Definition: OgrePass.h:56
bool mHashDirtyQueued
Pass hash.
Definition: OgrePass.h:102
Real mShininess
Definition: OgrePass.h:109
static PassSet msDirtyHashList
List of Passes whose hashes need recalculating.
Definition: OgrePass.h:247
UserObjectBindings & getUserObjectBindings()
Return an instance of user objects binding associated with this class.
Definition: OgrePass.h:1678
unsigned short getNumTextureUnitStates(void) const
Returns the number of texture unit settings.
Definition: OgrePass.h:605
Class that provides convenient interface to establish a linkage between custom user application objec...
TextureFilterOptions
High-level filtering options providing shortcuts to settings the minification, magnification and mip ...
Definition: OgreCommon.h:109
This utility class is used to hold the information used to generate the matrices and other informatio...
TrackVertexColourType mTracking
Definition: OgrePass.h:110
vector< size_t >::type ContentTypeLookup
Definition: OgrePass.h:228
bool getLightScissoringEnabled() const
Gets whether or not this pass will be clipped by a scissor rectangle encompassing the lights that are...
Definition: OgrePass.h:1571
bool mTransparentSortingForced
Transparent depth sorting forced.
Definition: OgrePass.h:153