OGRE  1.8
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-2013 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; // pass index
102  String mName; // optional name for the pass
103  uint32 mHash; // pass hash
104  bool mHashDirtyQueued; // needs to be dirtied when next loaded
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 
130  // Determines if we should use separate blending operations for color and alpha channels
132 
133  //-------------------------------------------------------------------------
134 
135  //-------------------------------------------------------------------------
136  // Depth buffer settings
143 
144  // Colour buffer settings
146 
147  // Alpha reject settings
149  unsigned char mAlphaRejectVal;
151 
152  // Transparent depth sorting
154  // Transparent depth sorting forced
156  //-------------------------------------------------------------------------
157 
158  //-------------------------------------------------------------------------
159  // Culling mode
162  //-------------------------------------------------------------------------
163 
167  unsigned short mMaxSimultaneousLights;
169  unsigned short mStartLight;
173  unsigned short mLightsPerIteration;
174  // Should it only be run for a certain light type?
177  // With a specific light mask?
179 
187  //-------------------------------------------------------------------------
188  // Fog
195  //-------------------------------------------------------------------------
196 
200 
201  // Vertex program details
203  // Vertex program details
205  // Fragment program details
207  // Vertex program details
209  // Fragment program details
211  // Fragment program details
213  // Geometry program details
215  // Is this pass queued for deletion?
217  // number of pass iterations to perform
219  // point size, applies when not using per-vertex point size
225  // constant, linear, quadratic coeffs
226  Real mPointAttenuationCoeffs[3];
227  // TU Content type lookups
237  // User objects binding.
239 
240 
241  // Used to get scene blending flags from a blending type
242  void _getBlendFlags(SceneBlendType type, SceneBlendFactor& source, SceneBlendFactor& dest);
243 
244  public:
246  protected:
253  public:
254  OGRE_STATIC_MUTEX(msDirtyHashListMutex)
255  OGRE_STATIC_MUTEX(msPassGraveyardMutex)
256  OGRE_MUTEX(mTexUnitChangeMutex)
257  OGRE_MUTEX(mGpuProgramChangeMutex)
259  Pass(Technique* parent, unsigned short index);
261  Pass(Technique* parent, unsigned short index, const Pass& oth );
263  Pass& operator=(const Pass& oth);
264  virtual ~Pass();
265 
267  bool isProgrammable(void) const { return mVertexProgramUsage || mFragmentProgramUsage || mGeometryProgramUsage; }
269  bool hasVertexProgram(void) const { return mVertexProgramUsage != NULL; }
271  bool hasFragmentProgram(void) const { return mFragmentProgramUsage != NULL; }
273  bool hasGeometryProgram(void) const { return mGeometryProgramUsage != NULL; }
275  bool hasShadowCasterVertexProgram(void) const { return mShadowCasterVertexProgramUsage != NULL; }
277  bool hasShadowCasterFragmentProgram(void) const { return mShadowCasterFragmentProgramUsage != NULL; }
279  bool hasShadowReceiverVertexProgram(void) const { return mShadowReceiverVertexProgramUsage != NULL; }
281  bool hasShadowReceiverFragmentProgram(void) const { return mShadowReceiverFragmentProgramUsage != NULL; }
282 
283 
285  unsigned short getIndex(void) const { return mIndex; }
286  /* Set the name of the pass
287  @remarks
288  The name of the pass is optional. Its useful in material scripts where a material could inherit
289  from another material and only want to modify a particular pass.
290  */
291  void setName(const String& name);
293  const String& getName(void) const { return mName; }
294 
306  void setAmbient(Real red, Real green, Real blue);
307 
320  void setAmbient(const ColourValue& ambient);
321 
332  void setDiffuse(Real red, Real green, Real blue, Real alpha);
333 
344  void setDiffuse(const ColourValue& diffuse);
345 
358  void setSpecular(Real red, Real green, Real blue, Real alpha);
359 
372  void setSpecular(const ColourValue& specular);
373 
379  void setShininess(Real val);
380 
390  void setSelfIllumination(Real red, Real green, Real blue);
391 
396  void setEmissive(Real red, Real green, Real blue)
397  {
398  setSelfIllumination(red, green, blue);
399  }
400 
410  void setSelfIllumination(const ColourValue& selfIllum);
411 
416  void setEmissive(const ColourValue& emissive)
417  {
418  setSelfIllumination(emissive);
419  }
420 
423  void setVertexColourTracking(TrackVertexColourType tracking);
424 
430  Real getPointSize(void) const;
431 
447  void setPointSize(Real ps);
448 
454  void setPointSpritesEnabled(bool enabled);
455 
459  bool getPointSpritesEnabled(void) const;
460 
477  void setPointAttenuation(bool enabled,
478  Real constant = 0.0f, Real linear = 1.0f, Real quadratic = 0.0f);
479 
481  bool isPointAttenuationEnabled(void) const;
482 
484  Real getPointAttenuationConstant(void) const;
486  Real getPointAttenuationLinear(void) const;
488  Real getPointAttenuationQuadratic(void) const;
489 
491  void setPointMinSize(Real min);
493  Real getPointMinSize(void) const;
497  void setPointMaxSize(Real max);
501  Real getPointMaxSize(void) const;
502 
505  const ColourValue& getAmbient(void) const;
506 
509  const ColourValue& getDiffuse(void) const;
510 
513  const ColourValue& getSpecular(void) const;
514 
517  const ColourValue& getSelfIllumination(void) const;
518 
523  const ColourValue& getEmissive(void) const
524  {
525  return getSelfIllumination();
526  }
527 
530  Real getShininess(void) const;
531 
534  TrackVertexColourType getVertexColourTracking(void) const;
535 
540  TextureUnitState* createTextureUnitState(void);
551  TextureUnitState* createTextureUnitState( const String& textureName, unsigned short texCoordSet = 0);
557  void addTextureUnitState(TextureUnitState* state);
560  TextureUnitState* getTextureUnitState(unsigned short index);
564  TextureUnitState* getTextureUnitState(const String& name);
567  const TextureUnitState* getTextureUnitState(unsigned short index) const;
571  const TextureUnitState* getTextureUnitState(const String& name) const;
572 
579  unsigned short getTextureUnitStateIndex(const TextureUnitState* state) const;
580 
583  TextureUnitStateIterator getTextureUnitStateIterator(void);
584 
587  ConstTextureUnitStateIterator getTextureUnitStateIterator(void) const;
588 
593  void removeTextureUnitState(unsigned short index);
594 
597  void removeAllTextureUnitStates(void);
598 
601  unsigned short getNumTextureUnitStates(void) const
602  {
603  return static_cast<unsigned short>(mTextureUnitStates.size());
604  }
605 
622  void setSceneBlending( const SceneBlendType sbt );
623 
642  void setSeparateSceneBlending( const SceneBlendType sbt, const SceneBlendType sbta );
643 
666  void setSceneBlending( const SceneBlendFactor sourceFactor, const SceneBlendFactor destFactor);
667 
694  void setSeparateSceneBlending( const SceneBlendFactor sourceFactor, const SceneBlendFactor destFactor, const SceneBlendFactor sourceFactorAlpha, const SceneBlendFactor destFactorAlpha );
695 
697  bool hasSeparateSceneBlending() const;
698 
701  SceneBlendFactor getSourceBlendFactor() const;
702 
705  SceneBlendFactor getDestBlendFactor() const;
706 
709  SceneBlendFactor getSourceBlendFactorAlpha() const;
710 
713  SceneBlendFactor getDestBlendFactorAlpha() const;
714 
725  void setSceneBlendingOperation(SceneBlendOperation op);
726 
740  void setSeparateSceneBlendingOperation(SceneBlendOperation op, SceneBlendOperation alphaOp);
741 
743  bool hasSeparateSceneBlendingOperations() const;
744 
746  SceneBlendOperation getSceneBlendingOperation() const;
747 
749  SceneBlendOperation getSceneBlendingOperationAlpha() const;
750 
752  bool isTransparent(void) const;
753 
765  void setDepthCheckEnabled(bool enabled);
766 
771  bool getDepthCheckEnabled(void) const;
772 
783  void setDepthWriteEnabled(bool enabled);
784 
789  bool getDepthWriteEnabled(void) const;
790 
798  void setDepthFunction( CompareFunction func );
803  CompareFunction getDepthFunction(void) const;
804 
815  void setColourWriteEnabled(bool enabled);
817  bool getColourWriteEnabled(void) const;
818 
832  void setCullingMode( CullingMode mode );
833 
836  CullingMode getCullingMode(void) const;
837 
851  void setManualCullingMode( ManualCullingMode mode );
852 
857  ManualCullingMode getManualCullingMode(void) const;
858 
867  void setLightingEnabled(bool enabled);
868 
871  bool getLightingEnabled(void) const;
872 
881  void setMaxSimultaneousLights(unsigned short maxLights);
883  unsigned short getMaxSimultaneousLights(void) const;
884 
895  void setStartLight(unsigned short startLight);
897  unsigned short getStartLight(void) const;
898 
900  void setLightMask(uint32 mask);
902  uint32 getLightMask() const;
903 
908  void setShadingMode( ShadeOptions mode );
909 
912  ShadeOptions getShadingMode(void) const;
913 
918  void setPolygonMode( PolygonMode mode );
919 
922  PolygonMode getPolygonMode(void) const;
923 
929  virtual void setPolygonModeOverrideable(bool override)
930  {
931  mPolygonModeOverrideable = override;
932  }
933 
937  virtual bool getPolygonModeOverrideable(void) const
938  {
939  return mPolygonModeOverrideable;
940  }
970  void setFog(
971  bool overrideScene,
972  FogMode mode = FOG_NONE,
973  const ColourValue& colour = ColourValue::White,
974  Real expDensity = 0.001, Real linearStart = 0.0, Real linearEnd = 1.0 );
975 
978  bool getFogOverride(void) const;
979 
984  FogMode getFogMode(void) const;
985 
988  const ColourValue& getFogColour(void) const;
989 
994  Real getFogStart(void) const;
995 
1000  Real getFogEnd(void) const;
1001 
1006  Real getFogDensity(void) const;
1007 
1027  void setDepthBias(float constantBias, float slopeScaleBias = 0.0f);
1028 
1030  float getDepthBiasConstant(void) const;
1032  float getDepthBiasSlopeScale(void) const;
1039  void setIterationDepthBias(float biasPerIteration);
1043  float getIterationDepthBias() const;
1044 
1054  void setAlphaRejectSettings(CompareFunction func, unsigned char value, bool alphaToCoverageEnabled = false);
1055 
1058  void setAlphaRejectFunction(CompareFunction func);
1059 
1062  void setAlphaRejectValue(unsigned char val);
1063 
1066  CompareFunction getAlphaRejectFunction(void) const { return mAlphaRejectFunc; }
1067 
1070  unsigned char getAlphaRejectValue(void) const { return mAlphaRejectVal; }
1071 
1079  void setAlphaToCoverageEnabled(bool enabled);
1080 
1083  bool isAlphaToCoverageEnabled() const { return mAlphaToCoverageEnabled; }
1084 
1097  void setTransparentSortingEnabled(bool enabled);
1098 
1101  bool getTransparentSortingEnabled(void) const;
1102 
1112  void setTransparentSortingForced(bool enabled);
1113 
1116  bool getTransparentSortingForced(void) const;
1117 
1160  void setIteratePerLight(bool enabled,
1161  bool onlyForOneLightType = true, Light::LightTypes lightType = Light::LT_POINT);
1162 
1164  bool getIteratePerLight(void) const { return mIteratePerLight; }
1166  bool getRunOnlyForOneLightType(void) const { return mRunOnlyForOneLightType; }
1169  Light::LightTypes getOnlyLightType() const { return mOnlyLightType; }
1170 
1180  void setLightCountPerIteration(unsigned short c);
1184  unsigned short getLightCountPerIteration(void) const;
1185 
1187  Technique* getParent(void) const { return mParent; }
1188 
1190  const String& getResourceGroup(void) const;
1191 
1208  void setVertexProgram(const String& name, bool resetParams = true);
1215  void setVertexProgramParameters(GpuProgramParametersSharedPtr params);
1217  const String& getVertexProgramName(void) const;
1219  GpuProgramParametersSharedPtr getVertexProgramParameters(void) const;
1221  const GpuProgramPtr& getVertexProgram(void) const;
1222 
1223 
1253  void setShadowCasterVertexProgram(const String& name);
1260  void setShadowCasterVertexProgramParameters(GpuProgramParametersSharedPtr params);
1262  const String& getShadowCasterVertexProgramName(void) const;
1264  GpuProgramParametersSharedPtr getShadowCasterVertexProgramParameters(void) const;
1267  const GpuProgramPtr& getShadowCasterVertexProgram(void) const;
1268 
1298  void setShadowCasterFragmentProgram(const String& name);
1305  void setShadowCasterFragmentProgramParameters(GpuProgramParametersSharedPtr params);
1307  const String& getShadowCasterFragmentProgramName(void) const;
1309  GpuProgramParametersSharedPtr getShadowCasterFragmentProgramParameters(void) const;
1312  const GpuProgramPtr& getShadowCasterFragmentProgram(void) const;
1313 
1339  void setShadowReceiverVertexProgram(const String& name);
1346  void setShadowReceiverVertexProgramParameters(GpuProgramParametersSharedPtr params);
1347 
1368  void setShadowReceiverFragmentProgram(const String& name);
1375  void setShadowReceiverFragmentProgramParameters(GpuProgramParametersSharedPtr params);
1376 
1378  const String& getShadowReceiverVertexProgramName(void) const;
1380  GpuProgramParametersSharedPtr getShadowReceiverVertexProgramParameters(void) const;
1383  const GpuProgramPtr& getShadowReceiverVertexProgram(void) const;
1384 
1386  const String& getShadowReceiverFragmentProgramName(void) const;
1388  GpuProgramParametersSharedPtr getShadowReceiverFragmentProgramParameters(void) const;
1391  const GpuProgramPtr& getShadowReceiverFragmentProgram(void) const;
1392 
1409  void setFragmentProgram(const String& name, bool resetParams = true);
1414  void setFragmentProgramParameters(GpuProgramParametersSharedPtr params);
1416  const String& getFragmentProgramName(void) const;
1418  GpuProgramParametersSharedPtr getFragmentProgramParameters(void) const;
1420  const GpuProgramPtr& getFragmentProgram(void) const;
1421 
1438  void setGeometryProgram(const String& name, bool resetParams = true);
1443  void setGeometryProgramParameters(GpuProgramParametersSharedPtr params);
1445  const String& getGeometryProgramName(void) const;
1447  GpuProgramParametersSharedPtr getGeometryProgramParameters(void) const;
1449  const GpuProgramPtr& getGeometryProgram(void) const;
1450 
1462  Pass* _split(unsigned short numUnits);
1463 
1465  void _notifyIndex(unsigned short index);
1466 
1468  void _prepare(void);
1470  void _unprepare(void);
1472  void _load(void);
1474  void _unload(void);
1475  // Is this loaded?
1476  bool isLoaded(void) const;
1477 
1484  uint32 getHash(void) const { return mHash; }
1486  void _dirtyHash(void);
1493  void _recalculateHash(void);
1495  void _notifyNeedsRecompile(void);
1496 
1501  void _updateAutoParams(const AutoParamDataSource* source, uint16 variabilityMask) const;
1502 
1509  unsigned short _getTextureUnitWithContentTypeIndex(
1510  TextureUnitState::ContentType contentType, unsigned short index) const;
1511 
1520  void setTextureFiltering(TextureFilterOptions filterType);
1529  void setTextureAnisotropy(unsigned int maxAniso);
1541  void setNormaliseNormals(bool normalise) { mNormaliseNormals = normalise; }
1542 
1544  bool getNormaliseNormals(void) const {return mNormaliseNormals; }
1545 
1549  static const PassSet& getDirtyHashList(void)
1550  { return msDirtyHashList; }
1553  static const PassSet& getPassGraveyard(void)
1554  { return msPassGraveyard; }
1562  static void clearDirtyHashList(void);
1563 
1565  static void processPendingPassUpdates(void);
1566 
1568  void queueForDeletion(void);
1569 
1572  bool isAmbientOnly(void) const;
1573 
1587  void setPassIterationCount(const size_t count) { mPassIterationCount = count; }
1588 
1591  size_t getPassIterationCount(void) const { return mPassIterationCount; }
1592 
1604  bool applyTextureAliases(const AliasTextureNamePairList& aliasList, const bool apply = true) const;
1605 
1626  void setLightScissoringEnabled(bool enabled) { mLightScissoring = enabled; }
1630  bool getLightScissoringEnabled() const { return mLightScissoring; }
1631 
1655  void setLightClipPlanesEnabled(bool enabled) { mLightClipPlanes = enabled; }
1659  bool getLightClipPlanesEnabled() const { return mLightClipPlanes; }
1660 
1682  void setIlluminationStage(IlluminationStage is) { mIlluminationStage = is; }
1684  IlluminationStage getIlluminationStage() const { return mIlluminationStage; }
1689  {
1696  MIN_GPU_PROGRAM_CHANGE
1697  };
1710  static void setHashFunction(BuiltinHashFunction builtin);
1711 
1723  static void setHashFunction(HashFunc* hashFunc) { msHashFunc = hashFunc; }
1724 
1727  static HashFunc* getHashFunction(void) { return msHashFunc; }
1728 
1731  static HashFunc* getBuiltinHashFunction(BuiltinHashFunction builtin);
1732 
1737  UserObjectBindings& getUserObjectBindings() { return mUserObjectBindings; }
1738 
1743  const UserObjectBindings& getUserObjectBindings() const { return mUserObjectBindings; }
1744  };
1745 
1755  struct IlluminationPass : public PassAlloc
1756  {
1764 
1766  };
1767 
1769 
1773 }
1774 
1775 #endif
bool mSeparateBlendOperation
Definition: OgrePass.h:131
ContentTypeLookup mShadowContentTypeLookup
Definition: OgrePass.h:229
bool hasVertexProgram(void) const
Returns true if this pass uses a programmable vertex pipeline.
Definition: OgrePass.h:269
void setEmissive(const ColourValue &emissive)
Sets the amount of self-illumination an object has.
Definition: OgrePass.h:416
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:153
float Real
Software floating point type.
Real mPointMinSize
Definition: OgrePass.h:221
unsigned int uint32
Definition: OgrePlatform.h:270
#define _OgreExport
Definition: OgrePlatform.h:233
bool mDepthCheck
Definition: OgrePass.h:137
bool mQueuedForDeletion
Definition: OgrePass.h:216
static HashFunc * msHashFunc
The Pass hash functor.
Definition: OgrePass.h:252
bool hasShadowCasterFragmentProgram(void) const
Returns true if this pass uses a shadow caster fragment program.
Definition: OgrePass.h:277
bool mFogOverride
Definition: OgrePass.h:189
SceneBlendOperation mAlphaBlendOperation
Definition: OgrePass.h:128
set< Pass * >::type PassSet
Definition: OgrePass.h:245
FogMode
Fog modes.
Definition: OgreCommon.h:124
Specialisation of SharedPtr to allow SharedPtr to be assigned to GpuProgramPtr.
ColourValue mSpecular
Definition: OgrePass.h:109
String mName
Definition: OgrePass.h:102
vector< unsigned short >::type ContentTypeLookup
Definition: OgrePass.h:228
bool mNormaliseNormals
Normalisation.
Definition: OgrePass.h:185
Class representing colour.
static const ColourValue White
GpuProgramUsage * mVertexProgramUsage
Definition: OgrePass.h:202
bool mLightClipPlanes
User clip planes for light?
Definition: OgrePass.h:234
const String & getName(void) const
get the name of the pass
Definition: OgrePass.h:293
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:585
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:1549
bool getRunOnlyForOneLightType(void) const
Does this pass run only for a single light type (if getIteratePerLight is true).
Definition: OgrePass.h:1166
SceneBlendType
Types of blending that you can specify between an object and the existing contents of the scene...
bool mRunOnlyForOneLightType
Definition: OgrePass.h:175
bool hasGeometryProgram(void) const
Returns true if this pass uses a programmable geometry pipeline.
Definition: OgrePass.h:273
Technique * getParent(void) const
Gets the parent Technique.
Definition: OgrePass.h:1187
GpuProgramUsage * mShadowCasterVertexProgramUsage
Definition: OgrePass.h:204
#define OGRE_MUTEX(name)
virtual bool getPolygonModeOverrideable(void) const
Gets whether this renderable's chosen detail level can be overridden (downgraded) by the camera setti...
Definition: OgrePass.h:937
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:1757
SceneBlendFactor
Blending factors for manually blending objects with the scene.
Try to minimise the number of texture changes.
Definition: OgrePass.h:1691
GpuProgramUsage * mShadowReceiverVertexProgramUsage
Definition: OgrePass.h:208
uint32 mLightMask
Definition: OgrePass.h:178
bool mColourWrite
Definition: OgrePass.h:145
bool hasFragmentProgram(void) const
Returns true if this pass uses a programmable fragment pipeline.
Definition: OgrePass.h:271
bool mSeparateBlend
Definition: OgrePass.h:123
bool hasShadowReceiverFragmentProgram(void) const
Returns true if this pass uses a shadow receiver fragment program.
Definition: OgrePass.h:281
bool mTransparentSorting
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:396
CullingMode
Hardware culling modes based on vertex winding.
Definition: OgreCommon.h:138
std::set< T, P, A > type
GpuProgramUsage * mGeometryProgramUsage
Definition: OgrePass.h:214
No fog. Duh.
Definition: OgreCommon.h:127
SceneBlendFactor mDestBlendFactor
Definition: OgrePass.h:118
static PassSet msPassGraveyard
The place where passes go to die.
Definition: OgrePass.h:250
#define OGRE_STATIC_MUTEX(name)
const ColourValue & getEmissive(void) const
Gets the self illumination colour of the pass.
Definition: OgrePass.h:523
unsigned char mAlphaRejectVal
Definition: OgrePass.h:149
IlluminationStage getIlluminationStage() const
Get the manually assigned illumination stage, if any.
Definition: OgrePass.h:1684
void setIlluminationStage(IlluminationStage is)
Manually set which illumination stage this pass is a member of.
Definition: OgrePass.h:1682
GpuProgramUsage * mFragmentProgramUsage
Definition: OgrePass.h:210
bool mLightScissoring
Scissoring for the light?
Definition: OgrePass.h:232
bool mAlphaToCoverageEnabled
Definition: OgrePass.h:150
SceneBlendFactor mDestBlendFactorAlpha
Definition: OgrePass.h:120
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:1626
ShadeOptions
Light shading modes.
Definition: OgreCommon.h:116
SceneBlendFactor mSourceBlendFactor
Definition: OgrePass.h:117
uint32 mHash
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:1655
CompareFunction getAlphaRejectFunction(void) const
Gets the alpha reject function.
Definition: OgrePass.h:1066
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:1164
size_t getPassIterationCount(void) const
Gets the pass iteration count value.
Definition: OgrePass.h:1591
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
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
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:1688
static void setHashFunction(HashFunc *hashFunc)
Set the hash function used for all passes.
Definition: OgrePass.h:1723
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:1587
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:929
Pass * pass
The pass to use in this stage.
Definition: OgrePass.h:1759
bool mPointAttenuationEnabled
Definition: OgrePass.h:224
bool getNormaliseNormals(void) const
Returns true if this pass has auto-normalisation of normals set.
Definition: OgrePass.h:1544
const UserObjectBindings & getUserObjectBindings() const
Return an instance of user objects binding associated with this class.
Definition: OgrePass.h:1743
uint32 getHash(void) const
Gets the 'hash' of this pass, ie a precomputed number to use for sorting.
Definition: OgrePass.h:1484
void setNormaliseNormals(bool normalise)
If set to true, this forces normals to be normalised dynamically by the hardware for this pass...
Definition: OgrePass.h:1541
VectorIterator< TextureUnitStates > TextureUnitStateIterator
Definition: OgrePass.h:581
Real mFogStart
Definition: OgrePass.h:192
unsigned short mMaxSimultaneousLights
Max simultaneous lights.
Definition: OgrePass.h:167
static const PassSet & getPassGraveyard(void)
Static method to retrieve all the Passes which are pending deletion.
Definition: OgrePass.h:1553
Real mPointSize
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:1755
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:275
IlluminationStage mIlluminationStage
Illumination stage?
Definition: OgrePass.h:236
CullingMode mCullMode
Definition: OgrePass.h:160
unsigned char getAlphaRejectValue(void) const
Gets the alpha reject value.
Definition: OgrePass.h:1070
PolygonMode
The polygon mode to use when rasterising.
Definition: OgreCommon.h:182
Real mPointMaxSize
Definition: OgrePass.h:222
bool mContentTypeLookupBuilt
Definition: OgrePass.h:230
vector< IlluminationPass * >::type IlluminationPassList
Definition: OgrePass.h:1768
float mDepthBiasConstant
Definition: OgrePass.h:140
size_t mPassIterationCount
Definition: OgrePass.h:218
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:1763
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:1659
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:1761
unsigned short uint16
Definition: OgrePlatform.h:271
Real mFogEnd
Definition: OgrePass.h:193
float mDepthBiasSlopeScale
Definition: OgrePass.h:141
ColourValue mAmbient
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:556
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:279
CompareFunction
Comparison functions used for the depth/stencil buffer operations and others.
Definition: OgreCommon.h:67
Class representing the state of a single texture unit during a Pass of a Technique, of a Material.
UserObjectBindings mUserObjectBindings
Definition: OgrePass.h:238
int TrackVertexColourType
An enumeration describing which material properties should track the vertex colours.
Definition: OgreCommon.h:279
bool mLightingEnabled
Lighting enabled?
Definition: OgrePass.h:165
PolygonMode mPolygonMode
Polygon mode.
Definition: OgrePass.h:183
GpuProgramUsage * mShadowCasterFragmentProgramUsage
Definition: OgrePass.h:206
static HashFunc * getHashFunction(void)
Get the hash function used for all passes.
Definition: OgrePass.h:1727
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:285
Light::LightTypes getOnlyLightType() const
Gets the single light type this pass runs for if getIteratePerLight and getRunOnlyForOneLightType are...
Definition: OgrePass.h:1169
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:1083
Not determined.
Definition: OgrePass.h:58
bool mHashDirtyQueued
Definition: OgrePass.h:104
Real mShininess
Definition: OgrePass.h:111
static PassSet msDirtyHashList
List of Passes whose hashes need recalculating.
Definition: OgrePass.h:248
UserObjectBindings & getUserObjectBindings()
Return an instance of user objects binding associated with this class.
Definition: OgrePass.h:1737
unsigned short getNumTextureUnitStates(void) const
Returns the number of texture unit settings.
Definition: OgrePass.h:601
Class that provide convenient interface to establish a linkage between custom user application object...
TextureFilterOptions
High-level filtering options providing shortcuts to settings the minification, magnification and mip ...
Definition: OgreCommon.h:81
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:1630
bool mTransparentSortingForced
Definition: OgrePass.h:155