OGRE  1.9
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 "OgreGpuProgram.h"
33 #include "OgreColourValue.h"
34 #include "OgreBlendMode.h"
35 #include "OgreCommon.h"
36 #include "OgreLight.h"
37 #include "OgreTextureUnitState.h"
38 #include "OgreUserObjectBindings.h"
39 
40 namespace Ogre {
41 
50  {
59  };
60 
80  class _OgreExport Pass : public PassAlloc
81  {
82  public:
93  struct HashFunc
94  {
95  virtual uint32 operator()(const Pass* p) const = 0;
97  virtual ~HashFunc() {}
98  };
99  protected:
101  unsigned short mIndex;
105  //-------------------------------------------------------------------------
106  // Colour properties, only applicable in fixed-function passes
113  //-------------------------------------------------------------------------
114 
115  //-------------------------------------------------------------------------
116  // Blending factors
121 
122  // Used to determine if separate alpha blending should be used for color and alpha channels
124 
125  //-------------------------------------------------------------------------
126  // Blending operations
129 
132 
133  //-------------------------------------------------------------------------
134 
135  //-------------------------------------------------------------------------
136  // Depth buffer settings
143 
146 
147  // Alpha reject settings
149  unsigned char mAlphaRejectVal;
151 
156  //-------------------------------------------------------------------------
157 
158  //-------------------------------------------------------------------------
159  // Culling mode
162  //-------------------------------------------------------------------------
163 
167  unsigned short mMaxSimultaneousLights;
169  unsigned short mStartLight;
173  unsigned short mLightsPerIteration;
179 
187  //-------------------------------------------------------------------------
188  // Fog
195  //-------------------------------------------------------------------------
196 
200 
232  Real mPointAttenuationCoeffs[3];
233  // TU Content type lookups
245 
246 
248  void _getBlendFlags(SceneBlendType type, SceneBlendFactor& source, SceneBlendFactor& dest);
249 
250  public:
252  protected:
259  public:
260  OGRE_STATIC_MUTEX(msDirtyHashListMutex);
261  OGRE_STATIC_MUTEX(msPassGraveyardMutex);
262  OGRE_MUTEX(mTexUnitChangeMutex);
263  OGRE_MUTEX(mGpuProgramChangeMutex);
265  Pass(Technique* parent, unsigned short index);
267  Pass(Technique* parent, unsigned short index, const Pass& oth );
269  Pass& operator=(const Pass& oth);
270  virtual ~Pass();
271 
273  bool isProgrammable(void) const { return mVertexProgramUsage || mFragmentProgramUsage || mGeometryProgramUsage ||
274  mTesselationHullProgramUsage || mTesselationDomainProgramUsage || mComputeProgramUsage; }
275 
277  bool hasVertexProgram(void) const { return mVertexProgramUsage != NULL; }
279  bool hasFragmentProgram(void) const { return mFragmentProgramUsage != NULL; }
281  bool hasGeometryProgram(void) const { return mGeometryProgramUsage != NULL; }
283  bool hasTesselationHullProgram(void) const { return mTesselationHullProgramUsage != NULL; }
285  bool hasTesselationDomainProgram(void) const { return mTesselationDomainProgramUsage != NULL; }
287  bool hasComputeProgram(void) const { return mComputeProgramUsage != NULL; }
289  bool hasShadowCasterVertexProgram(void) const { return mShadowCasterVertexProgramUsage != NULL; }
291  bool hasShadowCasterFragmentProgram(void) const { return mShadowCasterFragmentProgramUsage != NULL; }
293  bool hasShadowReceiverVertexProgram(void) const { return mShadowReceiverVertexProgramUsage != NULL; }
295  bool hasShadowReceiverFragmentProgram(void) const { return mShadowReceiverFragmentProgramUsage != NULL; }
296 
297  size_t calculateSize(void) const;
298 
300  unsigned short getIndex(void) const { return mIndex; }
301  /* Set the name of the pass
302  @remarks
303  The name of the pass is optional. Its useful in material scripts where a material could inherit
304  from another material and only want to modify a particular pass.
305  */
306  void setName(const String& name);
308  const String& getName(void) const { return mName; }
309 
321  void setAmbient(Real red, Real green, Real blue);
322 
335  void setAmbient(const ColourValue& ambient);
336 
347  void setDiffuse(Real red, Real green, Real blue, Real alpha);
348 
359  void setDiffuse(const ColourValue& diffuse);
360 
373  void setSpecular(Real red, Real green, Real blue, Real alpha);
374 
387  void setSpecular(const ColourValue& specular);
388 
394  void setShininess(Real val);
395 
405  void setSelfIllumination(Real red, Real green, Real blue);
406 
411  void setEmissive(Real red, Real green, Real blue)
412  {
413  setSelfIllumination(red, green, blue);
414  }
415 
425  void setSelfIllumination(const ColourValue& selfIllum);
426 
431  void setEmissive(const ColourValue& emissive)
432  {
433  setSelfIllumination(emissive);
434  }
435 
438  void setVertexColourTracking(TrackVertexColourType tracking);
439 
445  Real getPointSize(void) const;
446 
462  void setPointSize(Real ps);
463 
469  void setPointSpritesEnabled(bool enabled);
470 
474  bool getPointSpritesEnabled(void) const;
475 
493  void setPointAttenuation(bool enabled,
494  Real constant = 0.0f, Real linear = 1.0f, Real quadratic = 0.0f);
495 
497  bool isPointAttenuationEnabled(void) const;
498 
500  Real getPointAttenuationConstant(void) const;
502  Real getPointAttenuationLinear(void) const;
504  Real getPointAttenuationQuadratic(void) const;
505 
507  void setPointMinSize(Real min);
509  Real getPointMinSize(void) const;
513  void setPointMaxSize(Real max);
517  Real getPointMaxSize(void) const;
518 
521  const ColourValue& getAmbient(void) const;
522 
525  const ColourValue& getDiffuse(void) const;
526 
529  const ColourValue& getSpecular(void) const;
530 
533  const ColourValue& getSelfIllumination(void) const;
534 
539  const ColourValue& getEmissive(void) const
540  {
541  return getSelfIllumination();
542  }
543 
546  Real getShininess(void) const;
547 
550  TrackVertexColourType getVertexColourTracking(void) const;
551 
556  TextureUnitState* createTextureUnitState(void);
567  TextureUnitState* createTextureUnitState( const String& textureName, unsigned short texCoordSet = 0);
573  void addTextureUnitState(TextureUnitState* state);
576  TextureUnitState* getTextureUnitState(unsigned short index);
580  TextureUnitState* getTextureUnitState(const String& name);
583  const TextureUnitState* getTextureUnitState(unsigned short index) const;
587  const TextureUnitState* getTextureUnitState(const String& name) const;
588 
595  unsigned short getTextureUnitStateIndex(const TextureUnitState* state) const;
596 
599  TextureUnitStateIterator getTextureUnitStateIterator(void);
600 
603  ConstTextureUnitStateIterator getTextureUnitStateIterator(void) const;
604 
609  void removeTextureUnitState(unsigned short index);
610 
613  void removeAllTextureUnitStates(void);
614 
617  unsigned short getNumTextureUnitStates(void) const
618  {
619  return static_cast<unsigned short>(mTextureUnitStates.size());
620  }
621 
638  void setSceneBlending( const SceneBlendType sbt );
639 
658  void setSeparateSceneBlending( const SceneBlendType sbt, const SceneBlendType sbta );
659 
682  void setSceneBlending( const SceneBlendFactor sourceFactor, const SceneBlendFactor destFactor);
683 
710  void setSeparateSceneBlending( const SceneBlendFactor sourceFactor, const SceneBlendFactor destFactor, const SceneBlendFactor sourceFactorAlpha, const SceneBlendFactor destFactorAlpha );
711 
713  bool hasSeparateSceneBlending() const;
714 
717  SceneBlendFactor getSourceBlendFactor() const;
718 
721  SceneBlendFactor getDestBlendFactor() const;
722 
725  SceneBlendFactor getSourceBlendFactorAlpha() const;
726 
729  SceneBlendFactor getDestBlendFactorAlpha() const;
730 
741  void setSceneBlendingOperation(SceneBlendOperation op);
742 
756  void setSeparateSceneBlendingOperation(SceneBlendOperation op, SceneBlendOperation alphaOp);
757 
759  bool hasSeparateSceneBlendingOperations() const;
760 
762  SceneBlendOperation getSceneBlendingOperation() const;
763 
765  SceneBlendOperation getSceneBlendingOperationAlpha() const;
766 
768  bool isTransparent(void) const;
769 
781  void setDepthCheckEnabled(bool enabled);
782 
787  bool getDepthCheckEnabled(void) const;
788 
799  void setDepthWriteEnabled(bool enabled);
800 
805  bool getDepthWriteEnabled(void) const;
806 
814  void setDepthFunction( CompareFunction func );
819  CompareFunction getDepthFunction(void) const;
820 
831  void setColourWriteEnabled(bool enabled);
833  bool getColourWriteEnabled(void) const;
834 
848  void setCullingMode( CullingMode mode );
849 
852  CullingMode getCullingMode(void) const;
853 
867  void setManualCullingMode( ManualCullingMode mode );
868 
873  ManualCullingMode getManualCullingMode(void) const;
874 
883  void setLightingEnabled(bool enabled);
884 
887  bool getLightingEnabled(void) const;
888 
897  void setMaxSimultaneousLights(unsigned short maxLights);
899  unsigned short getMaxSimultaneousLights(void) const;
900 
911  void setStartLight(unsigned short startLight);
913  unsigned short getStartLight(void) const;
914 
916  void setLightMask(uint32 mask);
918  uint32 getLightMask() const;
919 
924  void setShadingMode( ShadeOptions mode );
925 
928  ShadeOptions getShadingMode(void) const;
929 
934  void setPolygonMode( PolygonMode mode );
935 
938  PolygonMode getPolygonMode(void) const;
939 
945  virtual void setPolygonModeOverrideable(bool override)
946  {
947  mPolygonModeOverrideable = override;
948  }
949 
953  virtual bool getPolygonModeOverrideable(void) const
954  {
955  return mPolygonModeOverrideable;
956  }
986  void setFog(
987  bool overrideScene,
988  FogMode mode = FOG_NONE,
989  const ColourValue& colour = ColourValue::White,
990  Real expDensity = 0.001, Real linearStart = 0.0, Real linearEnd = 1.0 );
991 
994  bool getFogOverride(void) const;
995 
1000  FogMode getFogMode(void) const;
1001 
1004  const ColourValue& getFogColour(void) const;
1005 
1010  Real getFogStart(void) const;
1011 
1016  Real getFogEnd(void) const;
1017 
1022  Real getFogDensity(void) const;
1023 
1043  void setDepthBias(float constantBias, float slopeScaleBias = 0.0f);
1044 
1046  float getDepthBiasConstant(void) const;
1048  float getDepthBiasSlopeScale(void) const;
1055  void setIterationDepthBias(float biasPerIteration);
1059  float getIterationDepthBias() const;
1060 
1070  void setAlphaRejectSettings(CompareFunction func, unsigned char value, bool alphaToCoverageEnabled = false);
1071 
1074  void setAlphaRejectFunction(CompareFunction func);
1075 
1078  void setAlphaRejectValue(unsigned char val);
1079 
1082  CompareFunction getAlphaRejectFunction(void) const { return mAlphaRejectFunc; }
1083 
1086  unsigned char getAlphaRejectValue(void) const { return mAlphaRejectVal; }
1087 
1095  void setAlphaToCoverageEnabled(bool enabled);
1096 
1099  bool isAlphaToCoverageEnabled() const { return mAlphaToCoverageEnabled; }
1100 
1113  void setTransparentSortingEnabled(bool enabled);
1114 
1117  bool getTransparentSortingEnabled(void) const;
1118 
1128  void setTransparentSortingForced(bool enabled);
1129 
1132  bool getTransparentSortingForced(void) const;
1133 
1176  void setIteratePerLight(bool enabled,
1177  bool onlyForOneLightType = true, Light::LightTypes lightType = Light::LT_POINT);
1178 
1180  bool getIteratePerLight(void) const { return mIteratePerLight; }
1182  bool getRunOnlyForOneLightType(void) const { return mRunOnlyForOneLightType; }
1185  Light::LightTypes getOnlyLightType() const { return mOnlyLightType; }
1186 
1196  void setLightCountPerIteration(unsigned short c);
1200  unsigned short getLightCountPerIteration(void) const;
1201 
1203  Technique* getParent(void) const { return mParent; }
1204 
1206  const String& getResourceGroup(void) const;
1207 
1224  void setVertexProgram(const String& name, bool resetParams = true);
1231  void setVertexProgramParameters(GpuProgramParametersSharedPtr params);
1233  const String& getVertexProgramName(void) const;
1235  GpuProgramParametersSharedPtr getVertexProgramParameters(void) const;
1237  const GpuProgramPtr& getVertexProgram(void) const;
1238 
1239 
1269  void setShadowCasterVertexProgram(const String& name);
1276  void setShadowCasterVertexProgramParameters(GpuProgramParametersSharedPtr params);
1278  const String& getShadowCasterVertexProgramName(void) const;
1280  GpuProgramParametersSharedPtr getShadowCasterVertexProgramParameters(void) const;
1283  const GpuProgramPtr& getShadowCasterVertexProgram(void) const;
1284 
1314  void setShadowCasterFragmentProgram(const String& name);
1321  void setShadowCasterFragmentProgramParameters(GpuProgramParametersSharedPtr params);
1323  const String& getShadowCasterFragmentProgramName(void) const;
1325  GpuProgramParametersSharedPtr getShadowCasterFragmentProgramParameters(void) const;
1328  const GpuProgramPtr& getShadowCasterFragmentProgram(void) const;
1329 
1355  void setShadowReceiverVertexProgram(const String& name);
1362  void setShadowReceiverVertexProgramParameters(GpuProgramParametersSharedPtr params);
1363 
1384  void setShadowReceiverFragmentProgram(const String& name);
1391  void setShadowReceiverFragmentProgramParameters(GpuProgramParametersSharedPtr params);
1392 
1394  const String& getShadowReceiverVertexProgramName(void) const;
1396  GpuProgramParametersSharedPtr getShadowReceiverVertexProgramParameters(void) const;
1399  const GpuProgramPtr& getShadowReceiverVertexProgram(void) const;
1400 
1402  const String& getShadowReceiverFragmentProgramName(void) const;
1404  GpuProgramParametersSharedPtr getShadowReceiverFragmentProgramParameters(void) const;
1407  const GpuProgramPtr& getShadowReceiverFragmentProgram(void) const;
1408 
1425  void setFragmentProgram(const String& name, bool resetParams = true);
1430  void setFragmentProgramParameters(GpuProgramParametersSharedPtr params);
1432  const String& getFragmentProgramName(void) const;
1434  GpuProgramParametersSharedPtr getFragmentProgramParameters(void) const;
1436  const GpuProgramPtr& getFragmentProgram(void) const;
1437 
1454  void setGeometryProgram(const String& name, bool resetParams = true);
1459  void setGeometryProgramParameters(GpuProgramParametersSharedPtr params);
1461  const String& getGeometryProgramName(void) const;
1463  GpuProgramParametersSharedPtr getGeometryProgramParameters(void) const;
1465  const GpuProgramPtr& getGeometryProgram(void) const;
1466 
1478  Pass* _split(unsigned short numUnits);
1479 
1481  void _notifyIndex(unsigned short index);
1482 
1484  void _prepare(void);
1486  void _unprepare(void);
1488  void _load(void);
1490  void _unload(void);
1492  bool isLoaded(void) const;
1493 
1500  uint32 getHash(void) const { return mHash; }
1502  void _dirtyHash(void);
1509  void _recalculateHash(void);
1511  void _notifyNeedsRecompile(void);
1512 
1517  void _updateAutoParams(const AutoParamDataSource* source, uint16 variabilityMask) const;
1518 
1525  unsigned short _getTextureUnitWithContentTypeIndex(
1526  TextureUnitState::ContentType contentType, unsigned short index) const;
1527 
1536  void setTextureFiltering(TextureFilterOptions filterType);
1545  void setTextureAnisotropy(unsigned int maxAniso);
1557  void setNormaliseNormals(bool normalise) { mNormaliseNormals = normalise; }
1558 
1560  bool getNormaliseNormals(void) const {return mNormaliseNormals; }
1561 
1565  static const PassSet& getDirtyHashList(void)
1566  { return msDirtyHashList; }
1569  static const PassSet& getPassGraveyard(void)
1570  { return msPassGraveyard; }
1578  static void clearDirtyHashList(void);
1579 
1581  static void processPendingPassUpdates(void);
1582 
1584  void queueForDeletion(void);
1585 
1588  bool isAmbientOnly(void) const;
1589 
1603  void setPassIterationCount(const size_t count) { mPassIterationCount = count; }
1604 
1607  size_t getPassIterationCount(void) const { return mPassIterationCount; }
1608 
1620  bool applyTextureAliases(const AliasTextureNamePairList& aliasList, const bool apply = true) const;
1621 
1642  void setLightScissoringEnabled(bool enabled) { mLightScissoring = enabled; }
1646  bool getLightScissoringEnabled() const { return mLightScissoring; }
1647 
1671  void setLightClipPlanesEnabled(bool enabled) { mLightClipPlanes = enabled; }
1675  bool getLightClipPlanesEnabled() const { return mLightClipPlanes; }
1676 
1698  void setIlluminationStage(IlluminationStage is) { mIlluminationStage = is; }
1700  IlluminationStage getIlluminationStage() const { return mIlluminationStage; }
1705  {
1712  MIN_GPU_PROGRAM_CHANGE
1713  };
1726  static void setHashFunction(BuiltinHashFunction builtin);
1727 
1739  static void setHashFunction(HashFunc* hashFunc) { msHashFunc = hashFunc; }
1740 
1743  static HashFunc* getHashFunction(void) { return msHashFunc; }
1744 
1747  static HashFunc* getBuiltinHashFunction(BuiltinHashFunction builtin);
1748 
1753  UserObjectBindings& getUserObjectBindings() { return mUserObjectBindings; }
1754 
1759  const UserObjectBindings& getUserObjectBindings() const { return mUserObjectBindings; }
1760 
1762 
1778  void setTesselationHullProgram(const String& name, bool resetParams = true);
1783  void setTesselationHullProgramParameters(GpuProgramParametersSharedPtr params);
1785  const String& getTesselationHullProgramName(void) const;
1787  GpuProgramParametersSharedPtr getTesselationHullProgramParameters(void) const;
1789  const GpuProgramPtr& getTesselationHullProgram(void) const;
1790 
1807  void setTesselationDomainProgram(const String& name, bool resetParams = true);
1812  void setTesselationDomainProgramParameters(GpuProgramParametersSharedPtr params);
1814  const String& getTesselationDomainProgramName(void) const;
1816  GpuProgramParametersSharedPtr getTesselationDomainProgramParameters(void) const;
1818  const GpuProgramPtr& getTesselationDomainProgram(void) const;
1819 
1836  void setComputeProgram(const String& name, bool resetParams = true);
1841  void setComputeProgramParameters(GpuProgramParametersSharedPtr params);
1843  const String& getComputeProgramName(void) const;
1845  GpuProgramParametersSharedPtr getComputeProgramParameters(void) const;
1847  const GpuProgramPtr& getComputeProgram(void) const;
1848  };
1849 
1859  struct IlluminationPass : public PassAlloc
1860  {
1868 
1870  };
1871 
1873 
1877 }
1878 
1879 #endif
bool mSeparateBlendOperation
Determines if we should use separate blending operations for color and alpha channels.
Definition: OgrePass.h:131
ContentTypeLookup mShadowContentTypeLookup
Definition: OgrePass.h:235
bool hasVertexProgram(void) const
Returns true if this pass uses a programmable vertex pipeline.
Definition: OgrePass.h:277
void setEmissive(const ColourValue &emissive)
Sets the amount of self-illumination an object has.
Definition: OgrePass.h:431
bool mDepthWrite
Definition: OgrePass.h:138
virtual ~HashFunc()
Need virtual destructor in case subclasses use it.
Definition: OgrePass.h:97
ManualCullingMode
Manual culling modes based on vertex normals.
Definition: OgreCommon.h:150
float Real
Software floating point type.
Real mPointMinSize
Definition: OgrePass.h:227
unsigned int uint32
Definition: OgrePlatform.h:344
#define _OgreExport
Definition: OgrePlatform.h:260
bool mDepthCheck
Definition: OgrePass.h:137
bool mQueuedForDeletion
Is this pass queued for deletion?
Definition: OgrePass.h:222
static HashFunc * msHashFunc
The Pass hash functor.
Definition: OgrePass.h:258
bool hasShadowCasterFragmentProgram(void) const
Returns true if this pass uses a shadow caster fragment program.
Definition: OgrePass.h:291
bool mFogOverride
Definition: OgrePass.h:189
GpuProgramUsage * mComputeProgramUsage
Compute program details.
Definition: OgrePass.h:220
SceneBlendOperation mAlphaBlendOperation
Definition: OgrePass.h:128
set< Pass * >::type PassSet
Definition: OgrePass.h:251
FogMode
Fog modes.
Definition: OgreCommon.h:121
#define OGRE_MUTEX(name)
ColourValue mSpecular
Definition: OgrePass.h:109
bool isProgrammable(void) const
Returns true if this pass is programmable i.e. includes either a vertex or fragment program...
Definition: OgrePass.h:273
String mName
Pass index.
Definition: OgrePass.h:102
vector< unsigned short >::type ContentTypeLookup
Definition: OgrePass.h:234
bool mNormaliseNormals
Normalisation.
Definition: OgrePass.h:185
Class representing colour.
static const ColourValue White
GpuProgramUsage * mVertexProgramUsage
Vertex program details.
Definition: OgrePass.h:202
bool mLightClipPlanes
User clip planes for light?
Definition: OgrePass.h:240
const String & getName(void) const
Get the name of the pass.
Definition: OgrePass.h:308
vector< TextureUnitState * >::type TextureUnitStates
Storage of texture unit states.
Definition: OgrePass.h:198
SceneBlendOperation mBlendOperation
Definition: OgrePass.h:127
ConstVectorIterator< TextureUnitStates > ConstTextureUnitStateIterator
Definition: OgrePass.h:601
LightTypes
Defines the type of light.
Definition: OgreLight.h:82
static const PassSet & getDirtyHashList(void)
Static method to retrieve all the Passes which need their hash values recalculated.
Definition: OgrePass.h:1565
bool getRunOnlyForOneLightType(void) const
Does this pass run only for a single light type (if getIteratePerLight is true).
Definition: OgrePass.h:1182
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:175
bool hasGeometryProgram(void) const
Returns true if this pass uses a programmable geometry pipeline.
Definition: OgrePass.h:281
Technique * getParent(void) const
Gets the parent Technique.
Definition: OgrePass.h:1203
GpuProgramUsage * mShadowCasterVertexProgramUsage
Vertex program details.
Definition: OgrePass.h:204
virtual bool getPolygonModeOverrideable(void) const
Gets whether this renderable's chosen detail level can be overridden (downgraded) by the camera setti...
Definition: OgrePass.h:953
Class representing an approach to rendering this particular Material.
Definition: OgreTechnique.h:53
Part of the rendering which occurs per light.
Definition: OgrePass.h:54
unsigned short mStartLight
Starting light index.
Definition: OgrePass.h:169
Part of the rendering which occurs without any kind of direct lighting.
Definition: OgrePass.h:52
IlluminationStage stage
Definition: OgrePass.h:1861
SceneBlendFactor
Blending factors for manually blending objects with the scene.
Try to minimise the number of texture changes.
Definition: OgrePass.h:1707
GpuProgramUsage * mShadowReceiverVertexProgramUsage
Vertex program details.
Definition: OgrePass.h:208
uint32 mLightMask
With a specific light mask?
Definition: OgrePass.h:178
bool mColourWrite
Colour buffer settings.
Definition: OgrePass.h:145
bool hasFragmentProgram(void) const
Returns true if this pass uses a programmable fragment pipeline.
Definition: OgrePass.h:279
bool mSeparateBlend
Definition: OgrePass.h:123
bool hasShadowReceiverFragmentProgram(void) const
Returns true if this pass uses a shadow receiver fragment program.
Definition: OgrePass.h:295
bool mTransparentSorting
Transparent depth sorting.
Definition: OgrePass.h:153
Class defining a single pass of a Technique (of a Material), i.e.
Definition: OgrePass.h:80
void setEmissive(Real red, Real green, Real blue)
Sets the amount of self-illumination an object has.
Definition: OgrePass.h:411
CullingMode
Hardware culling modes based on vertex winding.
Definition: OgreCommon.h:135
std::set< T, P, A > type
GpuProgramUsage * mGeometryProgramUsage
Geometry program details.
Definition: OgrePass.h:214
No fog. Duh.
Definition: OgreCommon.h:124
SceneBlendFactor mDestBlendFactor
Definition: OgrePass.h:118
static PassSet msPassGraveyard
The place where passes go to die.
Definition: OgrePass.h:256
const ColourValue & getEmissive(void) const
Gets the self illumination colour of the pass.
Definition: OgrePass.h:539
unsigned char mAlphaRejectVal
Definition: OgrePass.h:149
IlluminationStage getIlluminationStage() const
Get the manually assigned illumination stage, if any.
Definition: OgrePass.h:1700
void setIlluminationStage(IlluminationStage is)
Manually set which illumination stage this pass is a member of.
Definition: OgrePass.h:1698
GpuProgramUsage * mFragmentProgramUsage
Fragment program details.
Definition: OgrePass.h:210
bool mLightScissoring
Scissoring for the light?
Definition: OgrePass.h:238
bool mAlphaToCoverageEnabled
Definition: OgrePass.h:150
SceneBlendFactor mDestBlendFactorAlpha
Definition: OgrePass.h:120
GpuProgramUsage * mTesselationDomainProgramUsage
Tesselation domain program details.
Definition: OgrePass.h:218
GpuProgramUsage * mTesselationHullProgramUsage
Tesselation hull program details.
Definition: OgrePass.h:216
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:1642
ShadeOptions
Light shading modes.
Definition: OgreCommon.h:113
SceneBlendFactor mSourceBlendFactor
Definition: OgrePass.h:117
uint32 mHash
Optional name for the pass.
Definition: OgrePass.h:103
Definition of a functor for calculating the hashcode of a Pass.
Definition: OgrePass.h:93
ColourValue mEmissive
Definition: OgrePass.h:110
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:1671
CompareFunction getAlphaRejectFunction(void) const
Gets the alpha reject function.
Definition: OgrePass.h:1082
ManualCullingMode mManualCullMode
Definition: OgrePass.h:161
ColourValue mFogColour
Definition: OgrePass.h:191
bool getIteratePerLight(void) const
Does this pass run once for every light in range?
Definition: OgrePass.h:1180
size_t getPassIterationCount(void) const
Gets the pass iteration count value.
Definition: OgrePass.h:1607
CompareFunction mDepthFunc
Definition: OgrePass.h:139
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:171
bool mPolygonModeOverrideable
Definition: OgrePass.h:186
GpuProgramUsage * mShadowReceiverFragmentProgramUsage
Fragment program details.
Definition: OgrePass.h:212
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:119
unsigned short mLightsPerIteration
Iterate per how many lights?
Definition: OgrePass.h:173
bool hasTesselationDomainProgram(void) const
Returns true if this pass uses a programmable tesselation control pipeline.
Definition: OgrePass.h:285
CompareFunction mAlphaRejectFunc
Definition: OgrePass.h:148
Light::LightTypes mOnlyLightType
Definition: OgrePass.h:176
BuiltinHashFunction
There are some default hash functions used to order passes so that render state changes are minimised...
Definition: OgrePass.h:1704
static void setHashFunction(HashFunc *hashFunc)
Set the hash function used for all passes.
Definition: OgrePass.h:1739
IlluminationStage
Categorisation of passes for the purpose of additive lighting.
Definition: OgrePass.h:49
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:1603
unsigned short mIndex
Definition: OgrePass.h:101
virtual void setPolygonModeOverrideable(bool override)
Sets whether this pass's chosen detail level can be overridden (downgraded) by the camera setting...
Definition: OgrePass.h:945
Pass * pass
The pass to use in this stage.
Definition: OgrePass.h:1863
bool mPointAttenuationEnabled
Definition: OgrePass.h:230
bool getNormaliseNormals(void) const
Returns true if this pass has auto-normalisation of normals set.
Definition: OgrePass.h:1560
const UserObjectBindings & getUserObjectBindings() const
Return an instance of user objects binding associated with this class.
Definition: OgrePass.h:1759
bool hasComputeProgram(void) const
Returns true if this pass uses a programmable compute pipeline.
Definition: OgrePass.h:287
uint32 getHash(void) const
Gets the 'hash' of this pass, ie a precomputed number to use for sorting.
Definition: OgrePass.h:1500
void setNormaliseNormals(bool normalise)
If set to true, this forces normals to be normalised dynamically by the hardware for this pass...
Definition: OgrePass.h:1557
VectorIterator< TextureUnitStates > TextureUnitStateIterator
Definition: OgrePass.h:597
Real mFogStart
Definition: OgrePass.h:192
unsigned short mMaxSimultaneousLights
Max simultaneous lights.
Definition: OgrePass.h:167
bool hasTesselationHullProgram(void) const
Returns true if this pass uses a programmable tesselation control pipeline.
Definition: OgrePass.h:283
static const PassSet & getPassGraveyard(void)
Static method to retrieve all the Passes which are pending deletion.
Definition: OgrePass.h:1569
Real mPointSize
Point size, applies when not using per-vertex point size.
Definition: OgrePass.h:226
bool mPointSpritesEnabled
Definition: OgrePass.h:229
Struct recording a pass which can be used for a specific illumination stage.
Definition: OgrePass.h:1859
FogMode mFogMode
Definition: OgrePass.h:190
TextureUnitStates mTextureUnitStates
Definition: OgrePass.h:199
bool hasShadowCasterVertexProgram(void) const
Returns true if this pass uses a shadow caster vertex program.
Definition: OgrePass.h:289
IlluminationStage mIlluminationStage
Illumination stage?
Definition: OgrePass.h:242
CullingMode mCullMode
Definition: OgrePass.h:160
unsigned char getAlphaRejectValue(void) const
Gets the alpha reject value.
Definition: OgrePass.h:1086
PolygonMode
The polygon mode to use when rasterising.
Definition: OgreCommon.h:179
Real mPointMaxSize
Definition: OgrePass.h:228
bool mContentTypeLookupBuilt
Definition: OgrePass.h:236
vector< IlluminationPass * >::type IlluminationPassList
Definition: OgrePass.h:1872
float mDepthBiasConstant
Definition: OgrePass.h:140
#define OGRE_STATIC_MUTEX(name)
size_t mPassIterationCount
Number of pass iterations to perform.
Definition: OgrePass.h:224
float mDepthBiasPerIteration
Definition: OgrePass.h:142
SceneBlendOperation
Blending operations controls how objects are blended into the scene.
ShadeOptions mShadeOptions
Shading options.
Definition: OgrePass.h:181
Pass * originalPass
The original pass which spawned this one.
Definition: OgrePass.h:1867
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:1675
Real mFogDensity
Definition: OgrePass.h:194
_StringBase String
Post-lighting rendering.
Definition: OgrePass.h:56
Technique * mParent
Definition: OgrePass.h:100
bool destroyOnShutdown
Whether this pass is one which should be deleted itself.
Definition: OgrePass.h:1865
unsigned short uint16
Definition: OgrePlatform.h:345
Real mFogEnd
Definition: OgrePass.h:193
float mDepthBiasSlopeScale
Definition: OgrePass.h:141
ColourValue mAmbient
Needs to be dirtied when next loaded.
Definition: OgrePass.h:107
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:553
Point light sources give off light equally in all directions, so require only position not direction...
Definition: OgreLight.h:85
bool hasShadowReceiverVertexProgram(void) const
Returns true if this pass uses a shadow receiver vertex program.
Definition: OgrePass.h:293
CompareFunction
Comparison functions used for the depth/stencil buffer operations and others.
Definition: OgreCommon.h:64
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:244
int TrackVertexColourType
An enumeration describing which material properties should track the vertex colours.
Definition: OgreCommon.h:276
bool mLightingEnabled
Lighting enabled?
Definition: OgrePass.h:165
PolygonMode mPolygonMode
Polygon mode.
Definition: OgrePass.h:183
GpuProgramUsage * mShadowCasterFragmentProgramUsage
Fragment program details.
Definition: OgrePass.h:206
static HashFunc * getHashFunction(void)
Get the hash function used for all passes.
Definition: OgrePass.h:1743
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:300
Light::LightTypes getOnlyLightType() const
Gets the single light type this pass runs for if getIteratePerLight and getRunOnlyForOneLightType are...
Definition: OgrePass.h:1185
ColourValue mDiffuse
Definition: OgrePass.h:108
bool isAlphaToCoverageEnabled() const
Gets whether to use alpha to coverage (A2C) when blending alpha rejected values.
Definition: OgrePass.h:1099
Not determined.
Definition: OgrePass.h:58
bool mHashDirtyQueued
Pass hash.
Definition: OgrePass.h:104
Real mShininess
Definition: OgrePass.h:111
static PassSet msDirtyHashList
List of Passes whose hashes need recalculating.
Definition: OgrePass.h:254
UserObjectBindings & getUserObjectBindings()
Return an instance of user objects binding associated with this class.
Definition: OgrePass.h:1753
unsigned short getNumTextureUnitStates(void) const
Returns the number of texture unit settings.
Definition: OgrePass.h:617
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:78
This utility class is used to hold the information used to generate the matrices and other informatio...
TrackVertexColourType mTracking
Definition: OgrePass.h:112
bool getLightScissoringEnabled() const
Gets whether or not this pass will be clipped by a scissor rectangle encompassing the lights that are...
Definition: OgrePass.h:1646
bool mTransparentSortingForced
Transparent depth sorting forced.
Definition: OgrePass.h:155