95 virtual uint32 operator()(
const Pass* p)
const = 0;
232 Real mPointAttenuationCoeffs[3];
273 bool isProgrammable(
void)
const {
return mVertexProgramUsage || mFragmentProgramUsage || mGeometryProgramUsage ||
274 mTesselationHullProgramUsage || mTesselationDomainProgramUsage || mComputeProgramUsage; }
297 size_t calculateSize(
void)
const;
300 unsigned short getIndex(
void)
const {
return mIndex; }
306 void setName(
const String& name);
394 void setShininess(
Real val);
405 void setSelfIllumination(
Real red,
Real green,
Real blue);
413 setSelfIllumination(red, green, blue);
425 void setSelfIllumination(
const ColourValue& selfIllum);
433 setSelfIllumination(emissive);
445 Real getPointSize(
void)
const;
462 void setPointSize(
Real ps);
469 void setPointSpritesEnabled(
bool enabled);
474 bool getPointSpritesEnabled(
void)
const;
493 void setPointAttenuation(
bool enabled,
494 Real constant = 0.0f,
Real linear = 1.0f,
Real quadratic = 0.0f);
497 bool isPointAttenuationEnabled(
void)
const;
500 Real getPointAttenuationConstant(
void)
const;
502 Real getPointAttenuationLinear(
void)
const;
504 Real getPointAttenuationQuadratic(
void)
const;
507 void setPointMinSize(
Real min);
509 Real getPointMinSize(
void)
const;
513 void setPointMaxSize(
Real max);
517 Real getPointMaxSize(
void)
const;
533 const ColourValue& getSelfIllumination(
void)
const;
541 return getSelfIllumination();
546 Real getShininess(
void)
const;
595 unsigned short getTextureUnitStateIndex(
const TextureUnitState* state)
const;
609 void removeTextureUnitState(
unsigned short index);
613 void removeAllTextureUnitStates(
void);
619 return static_cast<unsigned short>(mTextureUnitStates.size());
713 bool hasSeparateSceneBlending()
const;
759 bool hasSeparateSceneBlendingOperations()
const;
768 bool isTransparent(
void)
const;
781 void setDepthCheckEnabled(
bool enabled);
787 bool getDepthCheckEnabled(
void)
const;
799 void setDepthWriteEnabled(
bool enabled);
805 bool getDepthWriteEnabled(
void)
const;
831 void setColourWriteEnabled(
bool enabled);
833 bool getColourWriteEnabled(
void)
const;
883 void setLightingEnabled(
bool enabled);
887 bool getLightingEnabled(
void)
const;
897 void setMaxSimultaneousLights(
unsigned short maxLights);
899 unsigned short getMaxSimultaneousLights(
void)
const;
911 void setStartLight(
unsigned short startLight);
913 unsigned short getStartLight(
void)
const;
916 void setLightMask(
uint32 mask);
918 uint32 getLightMask()
const;
947 mPolygonModeOverrideable =
override;
955 return mPolygonModeOverrideable;
990 Real expDensity = 0.001,
Real linearStart = 0.0,
Real linearEnd = 1.0 );
994 bool getFogOverride(
void)
const;
1000 FogMode getFogMode(
void)
const;
1010 Real getFogStart(
void)
const;
1016 Real getFogEnd(
void)
const;
1022 Real getFogDensity(
void)
const;
1043 void setDepthBias(
float constantBias,
float slopeScaleBias = 0.0f);
1046 float getDepthBiasConstant(
void)
const;
1048 float getDepthBiasSlopeScale(
void)
const;
1055 void setIterationDepthBias(
float biasPerIteration);
1059 float getIterationDepthBias()
const;
1070 void setAlphaRejectSettings(
CompareFunction func,
unsigned char value,
bool alphaToCoverageEnabled =
false);
1078 void setAlphaRejectValue(
unsigned char val);
1095 void setAlphaToCoverageEnabled(
bool enabled);
1113 void setTransparentSortingEnabled(
bool enabled);
1117 bool getTransparentSortingEnabled(
void)
const;
1128 void setTransparentSortingForced(
bool enabled);
1132 bool getTransparentSortingForced(
void)
const;
1176 void setIteratePerLight(
bool enabled,
1196 void setLightCountPerIteration(
unsigned short c);
1200 unsigned short getLightCountPerIteration(
void)
const;
1206 const String& getResourceGroup(
void)
const;
1224 void setVertexProgram(
const String& name,
bool resetParams =
true);
1233 const String& getVertexProgramName(
void)
const;
1269 void setShadowCasterVertexProgram(
const String& name);
1278 const String& getShadowCasterVertexProgramName(
void)
const;
1283 const GpuProgramPtr& getShadowCasterVertexProgram(
void)
const;
1314 void setShadowCasterFragmentProgram(
const String& name);
1323 const String& getShadowCasterFragmentProgramName(
void)
const;
1328 const GpuProgramPtr& getShadowCasterFragmentProgram(
void)
const;
1355 void setShadowReceiverVertexProgram(
const String& name);
1384 void setShadowReceiverFragmentProgram(
const String& name);
1394 const String& getShadowReceiverVertexProgramName(
void)
const;
1399 const GpuProgramPtr& getShadowReceiverVertexProgram(
void)
const;
1402 const String& getShadowReceiverFragmentProgramName(
void)
const;
1407 const GpuProgramPtr& getShadowReceiverFragmentProgram(
void)
const;
1425 void setFragmentProgram(
const String& name,
bool resetParams =
true);
1432 const String& getFragmentProgramName(
void)
const;
1454 void setGeometryProgram(
const String& name,
bool resetParams =
true);
1461 const String& getGeometryProgramName(
void)
const;
1478 Pass* _split(
unsigned short numUnits);
1481 void _notifyIndex(
unsigned short index);
1484 void _prepare(
void);
1486 void _unprepare(
void);
1492 bool isLoaded(
void)
const;
1502 void _dirtyHash(
void);
1509 void _recalculateHash(
void);
1511 void _notifyNeedsRecompile(
void);
1525 unsigned short _getTextureUnitWithContentTypeIndex(
1545 void setTextureAnisotropy(
unsigned int maxAniso);
1566 {
return msDirtyHashList; }
1570 {
return msPassGraveyard; }
1578 static void clearDirtyHashList(
void);
1581 static void processPendingPassUpdates(
void);
1584 void queueForDeletion(
void);
1588 bool isAmbientOnly(
void)
const;
1712 MIN_GPU_PROGRAM_CHANGE
1726 static void setHashFunction(BuiltinHashFunction builtin);
1747 static HashFunc* getBuiltinHashFunction(BuiltinHashFunction builtin);
1778 void setTesselationHullProgram(
const String& name,
bool resetParams =
true);
1785 const String& getTesselationHullProgramName(
void)
const;
1807 void setTesselationDomainProgram(
const String& name,
bool resetParams =
true);
1814 const String& getTesselationDomainProgramName(
void)
const;
1818 const GpuProgramPtr& getTesselationDomainProgram(
void)
const;
1836 void setComputeProgram(
const String& name,
bool resetParams =
true);
1843 const String& getComputeProgramName(
void)
const;
bool mSeparateBlendOperation
Determines if we should use separate blending operations for color and alpha channels.
ContentTypeLookup mShadowContentTypeLookup
bool hasVertexProgram(void) const
Returns true if this pass uses a programmable vertex pipeline.
void setEmissive(const ColourValue &emissive)
Sets the amount of self-illumination an object has.
virtual ~HashFunc()
Need virtual destructor in case subclasses use it.
ManualCullingMode
Manual culling modes based on vertex normals.
float Real
Software floating point type.
bool mQueuedForDeletion
Is this pass queued for deletion?
static HashFunc * msHashFunc
The Pass hash functor.
bool hasShadowCasterFragmentProgram(void) const
Returns true if this pass uses a shadow caster fragment program.
GpuProgramUsage * mComputeProgramUsage
Compute program details.
SceneBlendOperation mAlphaBlendOperation
set< Pass * >::type PassSet
bool isProgrammable(void) const
Returns true if this pass is programmable i.e. includes either a vertex or fragment program...
vector< unsigned short >::type ContentTypeLookup
bool mNormaliseNormals
Normalisation.
Class representing colour.
static const ColourValue White
GpuProgramUsage * mVertexProgramUsage
Vertex program details.
bool mLightClipPlanes
User clip planes for light?
const String & getName(void) const
Get the name of the pass.
vector< TextureUnitState * >::type TextureUnitStates
Storage of texture unit states.
SceneBlendOperation mBlendOperation
ConstVectorIterator< TextureUnitStates > ConstTextureUnitStateIterator
LightTypes
Defines the type of light.
static const PassSet & getDirtyHashList(void)
Static method to retrieve all the Passes which need their hash values recalculated.
bool getRunOnlyForOneLightType(void) const
Does this pass run only for a single light type (if getIteratePerLight is true).
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?
bool hasGeometryProgram(void) const
Returns true if this pass uses a programmable geometry pipeline.
Technique * getParent(void) const
Gets the parent Technique.
GpuProgramUsage * mShadowCasterVertexProgramUsage
Vertex program details.
virtual bool getPolygonModeOverrideable(void) const
Gets whether this renderable's chosen detail level can be overridden (downgraded) by the camera setti...
Class representing an approach to rendering this particular Material.
Part of the rendering which occurs per light.
unsigned short mStartLight
Starting light index.
Part of the rendering which occurs without any kind of direct lighting.
SceneBlendFactor
Blending factors for manually blending objects with the scene.
Try to minimise the number of texture changes.
GpuProgramUsage * mShadowReceiverVertexProgramUsage
Vertex program details.
uint32 mLightMask
With a specific light mask?
bool mColourWrite
Colour buffer settings.
bool hasFragmentProgram(void) const
Returns true if this pass uses a programmable fragment pipeline.
bool hasShadowReceiverFragmentProgram(void) const
Returns true if this pass uses a shadow receiver fragment program.
bool mTransparentSorting
Transparent depth sorting.
Class defining a single pass of a Technique (of a Material), i.e.
void setEmissive(Real red, Real green, Real blue)
Sets the amount of self-illumination an object has.
CullingMode
Hardware culling modes based on vertex winding.
GpuProgramUsage * mGeometryProgramUsage
Geometry program details.
SceneBlendFactor mDestBlendFactor
static PassSet msPassGraveyard
The place where passes go to die.
const ColourValue & getEmissive(void) const
Gets the self illumination colour of the pass.
unsigned char mAlphaRejectVal
IlluminationStage getIlluminationStage() const
Get the manually assigned illumination stage, if any.
void setIlluminationStage(IlluminationStage is)
Manually set which illumination stage this pass is a member of.
GpuProgramUsage * mFragmentProgramUsage
Fragment program details.
bool mLightScissoring
Scissoring for the light?
bool mAlphaToCoverageEnabled
SceneBlendFactor mDestBlendFactorAlpha
GpuProgramUsage * mTesselationDomainProgramUsage
Tesselation domain program details.
GpuProgramUsage * mTesselationHullProgramUsage
Tesselation hull program details.
void setLightScissoringEnabled(bool enabled)
Sets whether or not this pass will be clipped by a scissor rectangle encompassing the lights that are...
ShadeOptions
Light shading modes.
SceneBlendFactor mSourceBlendFactor
uint32 mHash
Optional name for the pass.
Definition of a functor for calculating the hashcode of a Pass.
void setLightClipPlanesEnabled(bool enabled)
Gets whether or not this pass will be clipped by user clips planes bounding the area covered by the l...
CompareFunction getAlphaRejectFunction(void) const
Gets the alpha reject function.
ManualCullingMode mManualCullMode
bool getIteratePerLight(void) const
Does this pass run once for every light in range?
size_t getPassIterationCount(void) const
Gets the pass iteration count value.
CompareFunction mDepthFunc
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?
bool mPolygonModeOverrideable
GpuProgramUsage * mShadowReceiverFragmentProgramUsage
Fragment program details.
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
unsigned short mLightsPerIteration
Iterate per how many lights?
bool hasTesselationDomainProgram(void) const
Returns true if this pass uses a programmable tesselation control pipeline.
CompareFunction mAlphaRejectFunc
Light::LightTypes mOnlyLightType
BuiltinHashFunction
There are some default hash functions used to order passes so that render state changes are minimised...
static void setHashFunction(HashFunc *hashFunc)
Set the hash function used for all passes.
IlluminationStage
Categorisation of passes for the purpose of additive lighting.
void setPassIterationCount(const size_t count)
set the number of iterations that this pass should perform when doing fast multi pass operation...
virtual void setPolygonModeOverrideable(bool override)
Sets whether this pass's chosen detail level can be overridden (downgraded) by the camera setting...
Pass * pass
The pass to use in this stage.
bool mPointAttenuationEnabled
bool getNormaliseNormals(void) const
Returns true if this pass has auto-normalisation of normals set.
const UserObjectBindings & getUserObjectBindings() const
Return an instance of user objects binding associated with this class.
bool hasComputeProgram(void) const
Returns true if this pass uses a programmable compute pipeline.
uint32 getHash(void) const
Gets the 'hash' of this pass, ie a precomputed number to use for sorting.
void setNormaliseNormals(bool normalise)
If set to true, this forces normals to be normalised dynamically by the hardware for this pass...
VectorIterator< TextureUnitStates > TextureUnitStateIterator
unsigned short mMaxSimultaneousLights
Max simultaneous lights.
bool hasTesselationHullProgram(void) const
Returns true if this pass uses a programmable tesselation control pipeline.
static const PassSet & getPassGraveyard(void)
Static method to retrieve all the Passes which are pending deletion.
Real mPointSize
Point size, applies when not using per-vertex point size.
bool mPointSpritesEnabled
Struct recording a pass which can be used for a specific illumination stage.
TextureUnitStates mTextureUnitStates
bool hasShadowCasterVertexProgram(void) const
Returns true if this pass uses a shadow caster vertex program.
IlluminationStage mIlluminationStage
Illumination stage?
unsigned char getAlphaRejectValue(void) const
Gets the alpha reject value.
PolygonMode
The polygon mode to use when rasterising.
bool mContentTypeLookupBuilt
vector< IlluminationPass * >::type IlluminationPassList
#define OGRE_STATIC_MUTEX(name)
size_t mPassIterationCount
Number of pass iterations to perform.
float mDepthBiasPerIteration
SceneBlendOperation
Blending operations controls how objects are blended into the scene.
ShadeOptions mShadeOptions
Shading options.
Pass * originalPass
The original pass which spawned this one.
bool getLightClipPlanesEnabled() const
Gets whether or not this pass will be clipped by user clips planes bounding the area covered by the l...
bool destroyOnShutdown
Whether this pass is one which should be deleted itself.
float mDepthBiasSlopeScale
ColourValue mAmbient
Needs to be dirtied when next loaded.
Concrete IteratorWrapper for nonconst access to the underlying container.
map< String, String >::type AliasTextureNamePairList
Alias / Texture name pair (first = alias, second = texture name)
Point light sources give off light equally in all directions, so require only position not direction...
bool hasShadowReceiverVertexProgram(void) const
Returns true if this pass uses a shadow receiver vertex program.
CompareFunction
Comparison functions used for the depth/stencil buffer operations and others.
Class representing the state of a single texture unit during a Pass of a Technique, of a Material.
UserObjectBindings mUserObjectBindings
User objects binding.
int TrackVertexColourType
An enumeration describing which material properties should track the vertex colours.
bool mLightingEnabled
Lighting enabled?
PolygonMode mPolygonMode
Polygon mode.
GpuProgramUsage * mShadowCasterFragmentProgramUsage
Fragment program details.
static HashFunc * getHashFunction(void)
Get the hash function used for all passes.
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.
Light::LightTypes getOnlyLightType() const
Gets the single light type this pass runs for if getIteratePerLight and getRunOnlyForOneLightType are...
bool isAlphaToCoverageEnabled() const
Gets whether to use alpha to coverage (A2C) when blending alpha rejected values.
bool mHashDirtyQueued
Pass hash.
static PassSet msDirtyHashList
List of Passes whose hashes need recalculating.
UserObjectBindings & getUserObjectBindings()
Return an instance of user objects binding associated with this class.
unsigned short getNumTextureUnitStates(void) const
Returns the number of texture unit settings.
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 ...
This utility class is used to hold the information used to generate the matrices and other informatio...
TrackVertexColourType mTracking
bool getLightScissoringEnabled() const
Gets whether or not this pass will be clipped by a scissor rectangle encompassing the lights that are...
bool mTransparentSortingForced
Transparent depth sorting forced.