OgrePass.h
Go to the documentation of this file.
/*
-----------------------------------------------------------------------------
This source file is part of OGRE
(Object-oriented Graphics Rendering Engine)
For the latest info, see http://www.ogre3d.org
Copyright (c) 2000-2013 Torus Knot Software Ltd
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
-----------------------------------------------------------------------------
*/
#ifndef __Pass_H__
#define __Pass_H__
#include "OgrePrerequisites.h"
#include "OgreGpuProgram.h"
#include "OgreColourValue.h"
#include "OgreBlendMode.h"
#include "OgreCommon.h"
#include "OgreLight.h"
#include "OgreTextureUnitState.h"
#include "OgreUserObjectBindings.h"
namespace Ogre {
enum IlluminationStage
{
IS_AMBIENT,
IS_PER_LIGHT,
IS_DECAL,
IS_UNKNOWN
};
class _OgreExport Pass : public PassAlloc
{
public:
struct HashFunc
{
virtual uint32 operator()(const Pass* p) const = 0;
virtual ~HashFunc() {}
};
protected:
Technique* mParent;
unsigned short mIndex;
String mName;
uint32 mHash;
bool mHashDirtyQueued;
//-------------------------------------------------------------------------
// Colour properties, only applicable in fixed-function passes
ColourValue mAmbient;
ColourValue mDiffuse;
ColourValue mSpecular;
ColourValue mEmissive;
Real mShininess;
TrackVertexColourType mTracking;
//-------------------------------------------------------------------------
//-------------------------------------------------------------------------
// Blending factors
SceneBlendFactor mSourceBlendFactor;
SceneBlendFactor mDestBlendFactor;
SceneBlendFactor mSourceBlendFactorAlpha;
SceneBlendFactor mDestBlendFactorAlpha;
// Used to determine if separate alpha blending should be used for color and alpha channels
bool mSeparateBlend;
//-------------------------------------------------------------------------
// Blending operations
SceneBlendOperation mBlendOperation;
SceneBlendOperation mAlphaBlendOperation;
bool mSeparateBlendOperation;
//-------------------------------------------------------------------------
//-------------------------------------------------------------------------
// Depth buffer settings
bool mDepthCheck;
bool mDepthWrite;
CompareFunction mDepthFunc;
float mDepthBiasConstant;
float mDepthBiasSlopeScale;
float mDepthBiasPerIteration;
bool mColourWrite;
// Alpha reject settings
CompareFunction mAlphaRejectFunc;
unsigned char mAlphaRejectVal;
bool mAlphaToCoverageEnabled;
bool mTransparentSorting;
bool mTransparentSortingForced;
//-------------------------------------------------------------------------
//-------------------------------------------------------------------------
// Culling mode
CullingMode mCullMode;
ManualCullingMode mManualCullMode;
//-------------------------------------------------------------------------
bool mLightingEnabled;
unsigned short mMaxSimultaneousLights;
unsigned short mStartLight;
bool mIteratePerLight;
unsigned short mLightsPerIteration;
bool mRunOnlyForOneLightType;
Light::LightTypes mOnlyLightType;
uint32 mLightMask;
ShadeOptions mShadeOptions;
PolygonMode mPolygonMode;
bool mNormaliseNormals;
bool mPolygonModeOverrideable;
//-------------------------------------------------------------------------
// Fog
bool mFogOverride;
FogMode mFogMode;
ColourValue mFogColour;
Real mFogStart;
Real mFogEnd;
Real mFogDensity;
//-------------------------------------------------------------------------
typedef vector<TextureUnitState*>::type TextureUnitStates;
TextureUnitStates mTextureUnitStates;
GpuProgramUsage *mVertexProgramUsage;
GpuProgramUsage *mShadowCasterVertexProgramUsage;
GpuProgramUsage *mShadowCasterFragmentProgramUsage;
GpuProgramUsage *mShadowReceiverVertexProgramUsage;
GpuProgramUsage *mFragmentProgramUsage;
GpuProgramUsage *mShadowReceiverFragmentProgramUsage;
GpuProgramUsage *mGeometryProgramUsage;
GpuProgramUsage *mTesselationHullProgramUsage;
GpuProgramUsage *mTesselationDomainProgramUsage;
GpuProgramUsage *mComputeProgramUsage;
bool mQueuedForDeletion;
size_t mPassIterationCount;
Real mPointSize;
Real mPointMinSize;
Real mPointMaxSize;
bool mPointSpritesEnabled;
bool mPointAttenuationEnabled;
Real mPointAttenuationCoeffs[3];
// TU Content type lookups
typedef vector<unsigned short>::type ContentTypeLookup;
mutable ContentTypeLookup mShadowContentTypeLookup;
mutable bool mContentTypeLookupBuilt;
bool mLightScissoring;
bool mLightClipPlanes;
IlluminationStage mIlluminationStage;
UserObjectBindings mUserObjectBindings;
void _getBlendFlags(SceneBlendType type, SceneBlendFactor& source, SceneBlendFactor& dest);
public:
typedef set<Pass*>::type PassSet;
protected:
static PassSet msDirtyHashList;
static PassSet msPassGraveyard;
static HashFunc* msHashFunc;
public:
OGRE_STATIC_MUTEX(msDirtyHashListMutex);
OGRE_STATIC_MUTEX(msPassGraveyardMutex);
OGRE_MUTEX(mTexUnitChangeMutex);
OGRE_MUTEX(mGpuProgramChangeMutex);
Pass(Technique* parent, unsigned short index);
Pass(Technique* parent, unsigned short index, const Pass& oth );
Pass& operator=(const Pass& oth);
virtual ~Pass();
bool isProgrammable(void) const { return mVertexProgramUsage || mFragmentProgramUsage || mGeometryProgramUsage ||
mTesselationHullProgramUsage || mTesselationDomainProgramUsage || mComputeProgramUsage; }
bool hasVertexProgram(void) const { return mVertexProgramUsage != NULL; }
bool hasFragmentProgram(void) const { return mFragmentProgramUsage != NULL; }
bool hasGeometryProgram(void) const { return mGeometryProgramUsage != NULL; }
bool hasTesselationHullProgram(void) const { return mTesselationHullProgramUsage != NULL; }
bool hasTesselationDomainProgram(void) const { return mTesselationDomainProgramUsage != NULL; }
bool hasComputeProgram(void) const { return mComputeProgramUsage != NULL; }
bool hasShadowCasterVertexProgram(void) const { return mShadowCasterVertexProgramUsage != NULL; }
bool hasShadowCasterFragmentProgram(void) const { return mShadowCasterFragmentProgramUsage != NULL; }
bool hasShadowReceiverVertexProgram(void) const { return mShadowReceiverVertexProgramUsage != NULL; }
bool hasShadowReceiverFragmentProgram(void) const { return mShadowReceiverFragmentProgramUsage != NULL; }
size_t calculateSize(void) const;
unsigned short getIndex(void) const { return mIndex; }
/* Set the name of the pass
@remarks
The name of the pass is optional. Its useful in material scripts where a material could inherit
from another material and only want to modify a particular pass.
*/
void setName(const String& name);
const String& getName(void) const { return mName; }
void setAmbient(Real red, Real green, Real blue);
void setAmbient(const ColourValue& ambient);
void setDiffuse(Real red, Real green, Real blue, Real alpha);
void setDiffuse(const ColourValue& diffuse);
void setSpecular(Real red, Real green, Real blue, Real alpha);
void setSpecular(const ColourValue& specular);
void setShininess(Real val);
void setSelfIllumination(Real red, Real green, Real blue);
void setEmissive(Real red, Real green, Real blue)
{
setSelfIllumination(red, green, blue);
}
void setSelfIllumination(const ColourValue& selfIllum);
void setEmissive(const ColourValue& emissive)
{
setSelfIllumination(emissive);
}
void setVertexColourTracking(TrackVertexColourType tracking);
Real getPointSize(void) const;
void setPointSize(Real ps);
void setPointSpritesEnabled(bool enabled);
bool getPointSpritesEnabled(void) const;
void setPointAttenuation(bool enabled,
Real constant = 0.0f, Real linear = 1.0f, Real quadratic = 0.0f);
bool isPointAttenuationEnabled(void) const;
Real getPointAttenuationConstant(void) const;
Real getPointAttenuationLinear(void) const;
Real getPointAttenuationQuadratic(void) const;
void setPointMinSize(Real min);
Real getPointMinSize(void) const;
void setPointMaxSize(Real max);
Real getPointMaxSize(void) const;
const ColourValue& getAmbient(void) const;
const ColourValue& getDiffuse(void) const;
const ColourValue& getSpecular(void) const;
const ColourValue& getSelfIllumination(void) const;
const ColourValue& getEmissive(void) const
{
return getSelfIllumination();
}
Real getShininess(void) const;
TrackVertexColourType getVertexColourTracking(void) const;
TextureUnitState* createTextureUnitState(void);
TextureUnitState* createTextureUnitState( const String& textureName, unsigned short texCoordSet = 0);
void addTextureUnitState(TextureUnitState* state);
TextureUnitState* getTextureUnitState(unsigned short index);
TextureUnitState* getTextureUnitState(const String& name);
const TextureUnitState* getTextureUnitState(unsigned short index) const;
const TextureUnitState* getTextureUnitState(const String& name) const;
unsigned short getTextureUnitStateIndex(const TextureUnitState* state) const;
typedef VectorIterator<TextureUnitStates> TextureUnitStateIterator;
TextureUnitStateIterator getTextureUnitStateIterator(void);
typedef ConstVectorIterator<TextureUnitStates> ConstTextureUnitStateIterator;
ConstTextureUnitStateIterator getTextureUnitStateIterator(void) const;
void removeTextureUnitState(unsigned short index);
void removeAllTextureUnitStates(void);
unsigned short getNumTextureUnitStates(void) const
{
return static_cast<unsigned short>(mTextureUnitStates.size());
}
void setSceneBlending( const SceneBlendType sbt );
void setSeparateSceneBlending( const SceneBlendType sbt, const SceneBlendType sbta );
void setSceneBlending( const SceneBlendFactor sourceFactor, const SceneBlendFactor destFactor);
void setSeparateSceneBlending( const SceneBlendFactor sourceFactor, const SceneBlendFactor destFactor, const SceneBlendFactor sourceFactorAlpha, const SceneBlendFactor destFactorAlpha );
bool hasSeparateSceneBlending() const;
SceneBlendFactor getSourceBlendFactor() const;
SceneBlendFactor getDestBlendFactor() const;
SceneBlendFactor getSourceBlendFactorAlpha() const;
SceneBlendFactor getDestBlendFactorAlpha() const;
void setSceneBlendingOperation(SceneBlendOperation op);
void setSeparateSceneBlendingOperation(SceneBlendOperation op, SceneBlendOperation alphaOp);
bool hasSeparateSceneBlendingOperations() const;
SceneBlendOperation getSceneBlendingOperation() const;
SceneBlendOperation getSceneBlendingOperationAlpha() const;
bool isTransparent(void) const;
void setDepthCheckEnabled(bool enabled);
bool getDepthCheckEnabled(void) const;
void setDepthWriteEnabled(bool enabled);
bool getDepthWriteEnabled(void) const;
void setDepthFunction( CompareFunction func );
CompareFunction getDepthFunction(void) const;
void setColourWriteEnabled(bool enabled);
bool getColourWriteEnabled(void) const;
void setCullingMode( CullingMode mode );
CullingMode getCullingMode(void) const;
void setManualCullingMode( ManualCullingMode mode );
ManualCullingMode getManualCullingMode(void) const;
void setLightingEnabled(bool enabled);
bool getLightingEnabled(void) const;
void setMaxSimultaneousLights(unsigned short maxLights);
unsigned short getMaxSimultaneousLights(void) const;
void setStartLight(unsigned short startLight);
unsigned short getStartLight(void) const;
void setLightMask(uint32 mask);
uint32 getLightMask() const;
void setShadingMode( ShadeOptions mode );
ShadeOptions getShadingMode(void) const;
void setPolygonMode( PolygonMode mode );
PolygonMode getPolygonMode(void) const;
virtual void setPolygonModeOverrideable(bool override)
{
mPolygonModeOverrideable = override;
}
virtual bool getPolygonModeOverrideable(void) const
{
return mPolygonModeOverrideable;
}
void setFog(
bool overrideScene,
FogMode mode = FOG_NONE,
const ColourValue& colour = ColourValue::White,
Real expDensity = 0.001, Real linearStart = 0.0, Real linearEnd = 1.0 );
bool getFogOverride(void) const;
FogMode getFogMode(void) const;
const ColourValue& getFogColour(void) const;
Real getFogStart(void) const;
Real getFogEnd(void) const;
Real getFogDensity(void) const;
void setDepthBias(float constantBias, float slopeScaleBias = 0.0f);
float getDepthBiasConstant(void) const;
float getDepthBiasSlopeScale(void) const;
void setIterationDepthBias(float biasPerIteration);
float getIterationDepthBias() const;
void setAlphaRejectSettings(CompareFunction func, unsigned char value, bool alphaToCoverageEnabled = false);
void setAlphaRejectFunction(CompareFunction func);
void setAlphaRejectValue(unsigned char val);
CompareFunction getAlphaRejectFunction(void) const { return mAlphaRejectFunc; }
unsigned char getAlphaRejectValue(void) const { return mAlphaRejectVal; }
void setAlphaToCoverageEnabled(bool enabled);
bool isAlphaToCoverageEnabled() const { return mAlphaToCoverageEnabled; }
void setTransparentSortingEnabled(bool enabled);
bool getTransparentSortingEnabled(void) const;
void setTransparentSortingForced(bool enabled);
bool getTransparentSortingForced(void) const;
void setIteratePerLight(bool enabled,
bool onlyForOneLightType = true, Light::LightTypes lightType = Light::LT_POINT);
bool getIteratePerLight(void) const { return mIteratePerLight; }
bool getRunOnlyForOneLightType(void) const { return mRunOnlyForOneLightType; }
Light::LightTypes getOnlyLightType() const { return mOnlyLightType; }
void setLightCountPerIteration(unsigned short c);
unsigned short getLightCountPerIteration(void) const;
Technique* getParent(void) const { return mParent; }
const String& getResourceGroup(void) const;
void setVertexProgram(const String& name, bool resetParams = true);
void setVertexProgramParameters(GpuProgramParametersSharedPtr params);
const String& getVertexProgramName(void) const;
GpuProgramParametersSharedPtr getVertexProgramParameters(void) const;
const GpuProgramPtr& getVertexProgram(void) const;
void setShadowCasterVertexProgram(const String& name);
void setShadowCasterVertexProgramParameters(GpuProgramParametersSharedPtr params);
const String& getShadowCasterVertexProgramName(void) const;
GpuProgramParametersSharedPtr getShadowCasterVertexProgramParameters(void) const;
const GpuProgramPtr& getShadowCasterVertexProgram(void) const;
void setShadowCasterFragmentProgram(const String& name);
void setShadowCasterFragmentProgramParameters(GpuProgramParametersSharedPtr params);
const String& getShadowCasterFragmentProgramName(void) const;
GpuProgramParametersSharedPtr getShadowCasterFragmentProgramParameters(void) const;
const GpuProgramPtr& getShadowCasterFragmentProgram(void) const;
void setShadowReceiverVertexProgram(const String& name);
void setShadowReceiverVertexProgramParameters(GpuProgramParametersSharedPtr params);
void setShadowReceiverFragmentProgram(const String& name);
void setShadowReceiverFragmentProgramParameters(GpuProgramParametersSharedPtr params);
const String& getShadowReceiverVertexProgramName(void) const;
GpuProgramParametersSharedPtr getShadowReceiverVertexProgramParameters(void) const;
const GpuProgramPtr& getShadowReceiverVertexProgram(void) const;
const String& getShadowReceiverFragmentProgramName(void) const;
GpuProgramParametersSharedPtr getShadowReceiverFragmentProgramParameters(void) const;
const GpuProgramPtr& getShadowReceiverFragmentProgram(void) const;
void setFragmentProgram(const String& name, bool resetParams = true);
void setFragmentProgramParameters(GpuProgramParametersSharedPtr params);
const String& getFragmentProgramName(void) const;
GpuProgramParametersSharedPtr getFragmentProgramParameters(void) const;
const GpuProgramPtr& getFragmentProgram(void) const;
void setGeometryProgram(const String& name, bool resetParams = true);
void setGeometryProgramParameters(GpuProgramParametersSharedPtr params);
const String& getGeometryProgramName(void) const;
GpuProgramParametersSharedPtr getGeometryProgramParameters(void) const;
const GpuProgramPtr& getGeometryProgram(void) const;
Pass* _split(unsigned short numUnits);
void _notifyIndex(unsigned short index);
void _prepare(void);
void _unprepare(void);
void _load(void);
void _unload(void);
bool isLoaded(void) const;
uint32 getHash(void) const { return mHash; }
void _dirtyHash(void);
void _recalculateHash(void);
void _notifyNeedsRecompile(void);
void _updateAutoParams(const AutoParamDataSource* source, uint16 variabilityMask) const;
unsigned short _getTextureUnitWithContentTypeIndex(
TextureUnitState::ContentType contentType, unsigned short index) const;
void setTextureFiltering(TextureFilterOptions filterType);
void setTextureAnisotropy(unsigned int maxAniso);
void setNormaliseNormals(bool normalise) { mNormaliseNormals = normalise; }
bool getNormaliseNormals(void) const {return mNormaliseNormals; }
static const PassSet& getDirtyHashList(void)
{ return msDirtyHashList; }
static const PassSet& getPassGraveyard(void)
{ return msPassGraveyard; }
static void clearDirtyHashList(void);
static void processPendingPassUpdates(void);
void queueForDeletion(void);
bool isAmbientOnly(void) const;
void setPassIterationCount(const size_t count) { mPassIterationCount = count; }
size_t getPassIterationCount(void) const { return mPassIterationCount; }
bool applyTextureAliases(const AliasTextureNamePairList& aliasList, const bool apply = true) const;
void setLightScissoringEnabled(bool enabled) { mLightScissoring = enabled; }
bool getLightScissoringEnabled() const { return mLightScissoring; }
void setLightClipPlanesEnabled(bool enabled) { mLightClipPlanes = enabled; }
bool getLightClipPlanesEnabled() const { return mLightClipPlanes; }
void setIlluminationStage(IlluminationStage is) { mIlluminationStage = is; }
IlluminationStage getIlluminationStage() const { return mIlluminationStage; }
enum BuiltinHashFunction
{
MIN_TEXTURE_CHANGE,
MIN_GPU_PROGRAM_CHANGE
};
static void setHashFunction(BuiltinHashFunction builtin);
static void setHashFunction(HashFunc* hashFunc) { msHashFunc = hashFunc; }
static HashFunc* getHashFunction(void) { return msHashFunc; }
static HashFunc* getBuiltinHashFunction(BuiltinHashFunction builtin);
UserObjectBindings& getUserObjectBindings() { return mUserObjectBindings; }
const UserObjectBindings& getUserObjectBindings() const { return mUserObjectBindings; }
void setTesselationHullProgram(const String& name, bool resetParams = true);
void setTesselationHullProgramParameters(GpuProgramParametersSharedPtr params);
const String& getTesselationHullProgramName(void) const;
GpuProgramParametersSharedPtr getTesselationHullProgramParameters(void) const;
const GpuProgramPtr& getTesselationHullProgram(void) const;
void setTesselationDomainProgram(const String& name, bool resetParams = true);
void setTesselationDomainProgramParameters(GpuProgramParametersSharedPtr params);
const String& getTesselationDomainProgramName(void) const;
GpuProgramParametersSharedPtr getTesselationDomainProgramParameters(void) const;
const GpuProgramPtr& getTesselationDomainProgram(void) const;
void setComputeProgram(const String& name, bool resetParams = true);
void setComputeProgramParameters(GpuProgramParametersSharedPtr params);
const String& getComputeProgramName(void) const;
GpuProgramParametersSharedPtr getComputeProgramParameters(void) const;
const GpuProgramPtr& getComputeProgram(void) const;
};
struct IlluminationPass : public PassAlloc
{
IlluminationStage stage;
Pass* pass;
bool destroyOnShutdown;
Pass* originalPass;
IlluminationPass() {}
};
typedef vector<IlluminationPass*>::type IlluminationPassList;
}
#endif
Ogre::Pass::mTransparentSorting
bool mTransparentSorting
Transparent depth sorting.
Definition: OgrePass.h:153
Ogre::Pass::mAlphaToCoverageEnabled
bool mAlphaToCoverageEnabled
Definition: OgrePass.h:150
Ogre::Pass::BuiltinHashFunction
BuiltinHashFunction
There are some default hash functions used to order passes so that render state changes are minimised...
Definition: OgrePass.h:1704
Ogre::IS_PER_LIGHT
Part of the rendering which occurs per light.
Definition: OgrePass.h:54
Ogre::Light::LT_POINT
Point light sources give off light equally in all directions, so require only position not direction...
Definition: OgreLight.h:85
Ogre::Pass::getPassIterationCount
size_t getPassIterationCount(void) const
Gets the pass iteration count value.
Definition: OgrePass.h:1607
Ogre::VectorIterator
Concrete IteratorWrapper for nonconst access to the underlying container.
Definition: OgreIteratorWrapper.h:186
Ogre::Pass::getHashFunction
static HashFunc * getHashFunction(void)
Get the hash function used for all passes.
Definition: OgrePass.h:1743
Ogre::Pass::mFogColour
ColourValue mFogColour
Definition: OgrePass.h:191
Ogre::FogMode
FogMode
Fog modes.
Definition: OgreCommon.h:121
Ogre::Pass::mShadowCasterVertexProgramUsage
GpuProgramUsage * mShadowCasterVertexProgramUsage
Vertex program details.
Definition: OgrePass.h:204
Ogre::Pass::setEmissive
void setEmissive(Real red, Real green, Real blue)
Sets the amount of self-illumination an object has.
Definition: OgrePass.h:411
Ogre::Pass::getOnlyLightType
Light::LightTypes getOnlyLightType() const
Gets the single light type this pass runs for if getIteratePerLight and getRunOnlyForOneLightType are...
Definition: OgrePass.h:1185
Ogre::Pass
Class defining a single pass of a Technique (of a Material), i.e.
Definition: OgrePass.h:80
Ogre::Pass::mFogOverride
bool mFogOverride
Definition: OgrePass.h:189
_OgreExport
#define _OgreExport
Definition: OgrePlatform.h:257
Ogre::Pass::MIN_TEXTURE_CHANGE
Try to minimise the number of texture changes.
Definition: OgrePass.h:1707
Ogre::Pass::mSourceBlendFactor
SceneBlendFactor mSourceBlendFactor
Definition: OgrePass.h:117
Ogre::Pass::getUserObjectBindings
UserObjectBindings & getUserObjectBindings()
Return an instance of user objects binding associated with this class.
Definition: OgrePass.h:1753
Ogre::TextureFilterOptions
TextureFilterOptions
High-level filtering options providing shortcuts to settings the minification, magnification and mip ...
Definition: OgreCommon.h:78
Ogre::Pass::setLightClipPlanesEnabled
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
Ogre::set::type
std::set< T, P, A > type
Definition: OgrePrerequisites.h:522
Ogre::Pass::hasShadowReceiverVertexProgram
bool hasShadowReceiverVertexProgram(void) const
Returns true if this pass uses a shadow receiver vertex program.
Definition: OgrePass.h:293
Ogre::IS_AMBIENT
Part of the rendering which occurs without any kind of direct lighting.
Definition: OgrePass.h:52
Ogre::Pass::mFogDensity
Real mFogDensity
Definition: OgrePass.h:194
Ogre::Pass::getDirtyHashList
static const PassSet & getDirtyHashList(void)
Static method to retrieve all the Passes which need their hash values recalculated.
Definition: OgrePass.h:1565
Ogre::Pass::mNormaliseNormals
bool mNormaliseNormals
Normalisation.
Definition: OgrePass.h:185
Ogre::Pass::TextureUnitStates
vector< TextureUnitState * >::type TextureUnitStates
Storage of texture unit states.
Definition: OgrePass.h:198
Ogre::Pass::isAlphaToCoverageEnabled
bool isAlphaToCoverageEnabled() const
Gets whether to use alpha to coverage (A2C) when blending alpha rejected values.
Definition: OgrePass.h:1099
Ogre::IlluminationPass::originalPass
Pass * originalPass
The original pass which spawned this one.
Definition: OgrePass.h:1867
Ogre::Pass::mShadowCasterFragmentProgramUsage
GpuProgramUsage * mShadowCasterFragmentProgramUsage
Fragment program details.
Definition: OgrePass.h:206
Ogre::Pass::mQueuedForDeletion
bool mQueuedForDeletion
Is this pass queued for deletion?
Definition: OgrePass.h:222
Ogre::Pass::getIndex
unsigned short getIndex(void) const
Gets the index of this Pass in the parent Technique.
Definition: OgrePass.h:300
Ogre::Pass::HashFunc::~HashFunc
virtual ~HashFunc()
Need virtual destructor in case subclasses use it.
Definition: OgrePass.h:97
Ogre::Pass::mShadowReceiverVertexProgramUsage
GpuProgramUsage * mShadowReceiverVertexProgramUsage
Vertex program details.
Definition: OgrePass.h:208
Ogre::Pass::mFragmentProgramUsage
GpuProgramUsage * mFragmentProgramUsage
Fragment program details.
Definition: OgrePass.h:210
Ogre::Pass::msHashFunc
static HashFunc * msHashFunc
The Pass hash functor.
Definition: OgrePass.h:258
Ogre::Pass::mIndex
unsigned short mIndex
Definition: OgrePass.h:101
Ogre::Pass::mPointMaxSize
Real mPointMaxSize
Definition: OgrePass.h:228
Ogre::ColourValue
Class representing colour.
Definition: OgreColourValue.h:57
Ogre::Real
float Real
Software floating point type.
Definition: OgrePrerequisites.h:70
Ogre::Pass::mEmissive
ColourValue mEmissive
Definition: OgrePass.h:110
Ogre::Pass::mLightMask
uint32 mLightMask
With a specific light mask?
Definition: OgrePass.h:178
Ogre::Pass::mDestBlendFactor
SceneBlendFactor mDestBlendFactor
Definition: OgrePass.h:118
Ogre::Pass::mDiffuse
ColourValue mDiffuse
Definition: OgrePass.h:108
Ogre::Pass::mDepthBiasConstant
float mDepthBiasConstant
Definition: OgrePass.h:140
Ogre::Pass::mFogStart
Real mFogStart
Definition: OgrePass.h:192
Ogre::SceneBlendType
SceneBlendType
Types of blending that you can specify between an object and the existing contents of the scene...
Definition: OgreBlendMode.h:215
OgreTextureUnitState.h
Ogre::Pass::HashFunc
Definition of a functor for calculating the hashcode of a Pass.
Definition: OgrePass.h:93
Ogre::Pass::mFogMode
FogMode mFogMode
Definition: OgrePass.h:190
Ogre::Pass::mLightClipPlanes
bool mLightClipPlanes
User clip planes for light?
Definition: OgrePass.h:240
Ogre::Pass::hasShadowReceiverFragmentProgram
bool hasShadowReceiverFragmentProgram(void) const
Returns true if this pass uses a shadow receiver fragment program.
Definition: OgrePass.h:295
Ogre::Pass::setPolygonModeOverrideable
virtual void setPolygonModeOverrideable(bool override)
Sets whether this pass&#39;s chosen detail level can be overridden (downgraded) by the camera setting...
Definition: OgrePass.h:945
Ogre::Pass::mShadowReceiverFragmentProgramUsage
GpuProgramUsage * mShadowReceiverFragmentProgramUsage
Fragment program details.
Definition: OgrePass.h:212
Ogre::Pass::mPointSize
Real mPointSize
Point size, applies when not using per-vertex point size.
Definition: OgrePass.h:226
Ogre::Pass::mRunOnlyForOneLightType
bool mRunOnlyForOneLightType
Should it only be run for a certain light type?
Definition: OgrePass.h:175
Ogre::Pass::getHash
uint32 getHash(void) const
Gets the &#39;hash&#39; of this pass, ie a precomputed number to use for sorting.
Definition: OgrePass.h:1500
OGRE_MUTEX
#define OGRE_MUTEX(name)
Definition: OgreThreadDefinesBoost.h:47
Ogre::Pass::getParent
Technique * getParent(void) const
Gets the parent Technique.
Definition: OgrePass.h:1203
Ogre::Pass::mIlluminationStage
IlluminationStage mIlluminationStage
Illumination stage?
Definition: OgrePass.h:242
Ogre::Pass::mDepthCheck
bool mDepthCheck
Definition: OgrePass.h:137
Ogre::Pass::hasShadowCasterFragmentProgram
bool hasShadowCasterFragmentProgram(void) const
Returns true if this pass uses a shadow caster fragment program.
Definition: OgrePass.h:291
Ogre::Pass::mGeometryProgramUsage
GpuProgramUsage * mGeometryProgramUsage
Geometry program details.
Definition: OgrePass.h:214
Ogre::Pass::mTesselationDomainProgramUsage
GpuProgramUsage * mTesselationDomainProgramUsage
Tesselation domain program details.
Definition: OgrePass.h:218
Ogre::Pass::getIlluminationStage
IlluminationStage getIlluminationStage() const
Get the manually assigned illumination stage, if any.
Definition: OgrePass.h:1700
Ogre::Pass::ContentTypeLookup
vector< unsigned short >::type ContentTypeLookup
Definition: OgrePass.h:234
Ogre::Pass::getName
const String & getName(void) const
Get the name of the pass.
Definition: OgrePass.h:308
Ogre::Pass::getIteratePerLight
bool getIteratePerLight(void) const
Does this pass run once for every light in range?
Definition: OgrePass.h:1180
Ogre::Pass::setIlluminationStage
void setIlluminationStage(IlluminationStage is)
Manually set which illumination stage this pass is a member of.
Definition: OgrePass.h:1698
Ogre::Pass::mTesselationHullProgramUsage
GpuProgramUsage * mTesselationHullProgramUsage
Tesselation hull program details.
Definition: OgrePass.h:216
Ogre::Pass::mParent
Technique * mParent
Definition: OgrePass.h:100
Ogre::Pass::mBlendOperation
SceneBlendOperation mBlendOperation
Definition: OgrePass.h:127
Ogre::Pass::hasTesselationDomainProgram
bool hasTesselationDomainProgram(void) const
Returns true if this pass uses a programmable tesselation control pipeline.
Definition: OgrePass.h:285
Ogre::Pass::hasGeometryProgram
bool hasGeometryProgram(void) const
Returns true if this pass uses a programmable geometry pipeline.
Definition: OgrePass.h:281
Ogre::Pass::mUserObjectBindings
UserObjectBindings mUserObjectBindings
User objects binding.
Definition: OgrePass.h:244
Ogre::Pass::mLightsPerIteration
unsigned short mLightsPerIteration
Iterate per how many lights?
Definition: OgrePass.h:173
Ogre::ColourValue::White
static const ColourValue White
Definition: OgreColourValue.h:62
Ogre::IlluminationPassList
vector< IlluminationPass * >::type IlluminationPassList
Definition: OgrePass.h:1872
OgreCommon.h
Ogre::IlluminationPass::destroyOnShutdown
bool destroyOnShutdown
Whether this pass is one which should be deleted itself.
Definition: OgrePass.h:1865
Ogre::Pass::mLightScissoring
bool mLightScissoring
Scissoring for the light?
Definition: OgrePass.h:238
Ogre::Pass::getAlphaRejectFunction
CompareFunction getAlphaRejectFunction(void) const
Gets the alpha reject function.
Definition: OgrePass.h:1082
Ogre::Pass::mPointSpritesEnabled
bool mPointSpritesEnabled
Definition: OgrePass.h:229
Ogre::Pass::hasFragmentProgram
bool hasFragmentProgram(void) const
Returns true if this pass uses a programmable fragment pipeline.
Definition: OgrePass.h:279
Ogre::Pass::mAlphaBlendOperation
SceneBlendOperation mAlphaBlendOperation
Definition: OgrePass.h:128
Ogre::IS_DECAL
Post-lighting rendering.
Definition: OgrePass.h:56
Ogre::Pass::msPassGraveyard
static PassSet msPassGraveyard
The place where passes go to die.
Definition: OgrePass.h:256
Ogre::Pass::mTracking
TrackVertexColourType mTracking
Definition: OgrePass.h:112
OgreUserObjectBindings.h
Ogre::Pass::mTextureUnitStates
TextureUnitStates mTextureUnitStates
Definition: OgrePass.h:199
Ogre::CullingMode
CullingMode
Hardware culling modes based on vertex winding.
Definition: OgreCommon.h:135
Ogre::TextureUnitState
Class representing the state of a single texture unit during a Pass of a Technique, of a Material.
Definition: OgreTextureUnitState.h:62
OgrePrerequisites.h
Ogre::Pass::getLightClipPlanesEnabled
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
Ogre::Pass::mShadowContentTypeLookup
ContentTypeLookup mShadowContentTypeLookup
Definition: OgrePass.h:235
Ogre::Pass::mShininess
Real mShininess
Definition: OgrePass.h:111
Ogre::Pass::mTransparentSortingForced
bool mTransparentSortingForced
Transparent depth sorting forced.
Definition: OgrePass.h:155
Ogre::Pass::getPassGraveyard
static const PassSet & getPassGraveyard(void)
Static method to retrieve all the Passes which are pending deletion.
Definition: OgrePass.h:1569
Ogre::Pass::mPolygonModeOverrideable
bool mPolygonModeOverrideable
Definition: OgrePass.h:186
Ogre::Pass::mOnlyLightType
Light::LightTypes mOnlyLightType
Definition: OgrePass.h:176
Ogre::Pass::mManualCullMode
ManualCullingMode mManualCullMode
Definition: OgrePass.h:161
Ogre::Pass::mPointAttenuationEnabled
bool mPointAttenuationEnabled
Definition: OgrePass.h:230
Ogre::TrackVertexColourType
int TrackVertexColourType
An enumeration describing which material properties should track the vertex colours.
Definition: OgreCommon.h:276
Ogre::AliasTextureNamePairList
map< String, String >::type AliasTextureNamePairList
Alias / Texture name pair (first = alias, second = texture name)
Definition: OgreCommon.h:553
Ogre::Pass::getNormaliseNormals
bool getNormaliseNormals(void) const
Returns true if this pass has auto-normalisation of normals set.
Definition: OgrePass.h:1560
Ogre::Pass::msDirtyHashList
static PassSet msDirtyHashList
List of Passes whose hashes need recalculating.
Definition: OgrePass.h:254
Ogre::Pass::setNormaliseNormals
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
Ogre::Pass::getUserObjectBindings
const UserObjectBindings & getUserObjectBindings() const
Return an instance of user objects binding associated with this class.
Definition: OgrePass.h:1759
Ogre::Pass::mCullMode
CullingMode mCullMode
Definition: OgrePass.h:160
Ogre::Pass::mStartLight
unsigned short mStartLight
Starting light index.
Definition: OgrePass.h:169
Ogre::IS_UNKNOWN
Not determined.
Definition: OgrePass.h:58
Ogre::Pass::setPassIterationCount
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
Ogre::CompareFunction
CompareFunction
Comparison functions used for the depth/stencil buffer operations and others.
Definition: OgreCommon.h:64
Ogre::Pass::setEmissive
void setEmissive(const ColourValue &emissive)
Sets the amount of self-illumination an object has.
Definition: OgrePass.h:431
Ogre::Pass::getNumTextureUnitStates
unsigned short getNumTextureUnitStates(void) const
Returns the number of texture unit settings.
Definition: OgrePass.h:617
Ogre::Pass::mHashDirtyQueued
bool mHashDirtyQueued
Pass hash.
Definition: OgrePass.h:104
Ogre::String
_StringBase String
Definition: OgrePrerequisites.h:439
Ogre::Pass::mShadeOptions
ShadeOptions mShadeOptions
Shading options.
Definition: OgrePass.h:181
Ogre::Pass::mColourWrite
bool mColourWrite
Colour buffer settings.
Definition: OgrePass.h:145
Ogre::Pass::setLightScissoringEnabled
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
Ogre::Pass::ConstTextureUnitStateIterator
ConstVectorIterator< TextureUnitStates > ConstTextureUnitStateIterator
Definition: OgrePass.h:601
Ogre::Pass::mSeparateBlendOperation
bool mSeparateBlendOperation
Determines if we should use separate blending operations for color and alpha channels.
Definition: OgrePass.h:131
Ogre::Pass::hasVertexProgram
bool hasVertexProgram(void) const
Returns true if this pass uses a programmable vertex pipeline.
Definition: OgrePass.h:277
Ogre::Pass::TextureUnitStateIterator
VectorIterator< TextureUnitStates > TextureUnitStateIterator
Definition: OgrePass.h:597
Ogre::Pass::mSeparateBlend
bool mSeparateBlend
Definition: OgrePass.h:123
Ogre::Pass::mDepthBiasPerIteration
float mDepthBiasPerIteration
Definition: OgrePass.h:142
Ogre::Pass::hasTesselationHullProgram
bool hasTesselationHullProgram(void) const
Returns true if this pass uses a programmable tesselation control pipeline.
Definition: OgrePass.h:283
Ogre::Pass::mDepthBiasSlopeScale
float mDepthBiasSlopeScale
Definition: OgrePass.h:141
Ogre::ManualCullingMode
ManualCullingMode
Manual culling modes based on vertex normals.
Definition: OgreCommon.h:150
Ogre::Pass::getEmissive
const ColourValue & getEmissive(void) const
Gets the self illumination colour of the pass.
Definition: OgrePass.h:539
Ogre::Pass::mName
String mName
Pass index.
Definition: OgrePass.h:102
Ogre::uint32
unsigned int uint32
Definition: OgrePlatform.h:359
Ogre::Pass::mLightingEnabled
bool mLightingEnabled
Lighting enabled?
Definition: OgrePass.h:165
Ogre::Pass::mPassIterationCount
size_t mPassIterationCount
Number of pass iterations to perform.
Definition: OgrePass.h:224
Ogre::IlluminationPass::pass
Pass * pass
The pass to use in this stage.
Definition: OgrePass.h:1863
Ogre::IlluminationPass
Struct recording a pass which can be used for a specific illumination stage.
Definition: OgrePass.h:1859
Ogre::Pass::mAlphaRejectFunc
CompareFunction mAlphaRejectFunc
Definition: OgrePass.h:148
Ogre::Pass::mFogEnd
Real mFogEnd
Definition: OgrePass.h:193
Ogre::Pass::mComputeProgramUsage
GpuProgramUsage * mComputeProgramUsage
Compute program details.
Definition: OgrePass.h:220
Ogre::Pass::mDestBlendFactorAlpha
SceneBlendFactor mDestBlendFactorAlpha
Definition: OgrePass.h:120
Ogre::Pass::mAlphaRejectVal
unsigned char mAlphaRejectVal
Definition: OgrePass.h:149
Ogre::SceneBlendFactor
SceneBlendFactor
Blending factors for manually blending objects with the scene.
Definition: OgreBlendMode.h:234
Ogre::Pass::getAlphaRejectValue
unsigned char getAlphaRejectValue(void) const
Gets the alpha reject value.
Definition: OgrePass.h:1086
Ogre
Definition: OgreAndroidLogListener.h:34
OGRE_STATIC_MUTEX
#define OGRE_STATIC_MUTEX(name)
Definition: OgreThreadDefinesBoost.h:48
Ogre::Pass::mIteratePerLight
bool mIteratePerLight
Run this pass once per light?
Definition: OgrePass.h:171
Ogre::FOG_NONE
No fog. Duh.
Definition: OgreCommon.h:124
Ogre::Pass::mVertexProgramUsage
GpuProgramUsage * mVertexProgramUsage
Vertex program details.
Definition: OgrePass.h:202
Ogre::SharedPtr< GpuProgramParameters >
Ogre::Light::LightTypes
LightTypes
Defines the type of light.
Definition: OgreLight.h:82
Ogre::ConstVectorIterator
Concrete IteratorWrapper for const access to the underlying container.
Definition: OgreIteratorWrapper.h:217
Ogre::Pass::PassSet
set< Pass * >::type PassSet
Definition: OgrePass.h:251
Ogre::vector
Definition: OgrePrerequisites.h:491
OgreColourValue.h
Ogre::UserObjectBindings
Class that provides convenient interface to establish a linkage between custom user application objec...
Definition: OgreUserObjectBindings.h:49
Ogre::IlluminationPass::IlluminationPass
IlluminationPass()
Definition: OgrePass.h:1869
Ogre::Pass::hasComputeProgram
bool hasComputeProgram(void) const
Returns true if this pass uses a programmable compute pipeline.
Definition: OgrePass.h:287
Ogre::IlluminationStage
IlluminationStage
Categorisation of passes for the purpose of additive lighting.
Definition: OgrePass.h:49
Ogre::Pass::mSpecular
ColourValue mSpecular
Definition: OgrePass.h:109
Ogre::Pass::mDepthFunc
CompareFunction mDepthFunc
Definition: OgrePass.h:139
Ogre::Pass::mSourceBlendFactorAlpha
SceneBlendFactor mSourceBlendFactorAlpha
Definition: OgrePass.h:119
Ogre::Pass::mPolygonMode
PolygonMode mPolygonMode
Polygon mode.
Definition: OgrePass.h:183
OgreBlendMode.h
Ogre::Technique
Class representing an approach to rendering this particular Material.
Definition: OgreTechnique.h:53
Ogre::Pass::mHash
uint32 mHash
Optional name for the pass.
Definition: OgrePass.h:103
Ogre::ShadeOptions
ShadeOptions
Light shading modes.
Definition: OgreCommon.h:113
Ogre::PolygonMode
PolygonMode
The polygon mode to use when rasterising.
Definition: OgreCommon.h:179
Ogre::SceneBlendOperation
SceneBlendOperation
Blending operations controls how objects are blended into the scene.
Definition: OgreBlendMode.h:253
Ogre::Pass::getRunOnlyForOneLightType
bool getRunOnlyForOneLightType(void) const
Does this pass run only for a single light type (if getIteratePerLight is true).
Definition: OgrePass.h:1182
Ogre::AutoParamDataSource
This utility class is used to hold the information used to generate the matrices and other informatio...
Definition: OgreAutoParamDataSource.h:60
Ogre::GpuProgramUsage
This class makes the usage of a vertex and fragment programs (low-level or high-level), with a given set of parameters, explicit.
Definition: OgreGpuProgramUsage.h:73
Ogre::Pass::mPointMinSize
Real mPointMinSize
Definition: OgrePass.h:227
Ogre::Pass::mContentTypeLookupBuilt
bool mContentTypeLookupBuilt
Definition: OgrePass.h:236
Ogre::Pass::mDepthWrite
bool mDepthWrite
Definition: OgrePass.h:138
Ogre::IlluminationPass::stage
IlluminationStage stage
Definition: OgrePass.h:1861
Ogre::Pass::setHashFunction
static void setHashFunction(HashFunc *hashFunc)
Set the hash function used for all passes.
Definition: OgrePass.h:1739
Ogre::Pass::mAmbient
ColourValue mAmbient
Needs to be dirtied when next loaded.
Definition: OgrePass.h:107
OgreGpuProgram.h
Ogre::TextureUnitState::ContentType
ContentType
Enum identifying the type of content this texture unit contains.
Definition: OgreTextureUnitState.h:487
Ogre::Pass::mMaxSimultaneousLights
unsigned short mMaxSimultaneousLights
Max simultaneous lights.
Definition: OgrePass.h:167
Ogre::uint16
unsigned short uint16
Definition: OgrePlatform.h:360
Ogre::Pass::getLightScissoringEnabled
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
Ogre::Pass::getPolygonModeOverrideable
virtual bool getPolygonModeOverrideable(void) const
Gets whether this renderable&#39;s chosen detail level can be overridden (downgraded) by the camera setti...
Definition: OgrePass.h:953
Ogre::AllocatedObject
Superclass for all objects that wish to use custom memory allocators when their new / delete operator...
Definition: OgreMemoryAllocatedObject.h:58
OgreLight.h
Ogre::Pass::hasShadowCasterVertexProgram
bool hasShadowCasterVertexProgram(void) const
Returns true if this pass uses a shadow caster vertex program.
Definition: OgrePass.h:289
Ogre::Pass::isProgrammable
bool isProgrammable(void) const
Returns true if this pass is programmable i.e. includes either a vertex or fragment program...
Definition: OgrePass.h:273

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