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;
599 TextureUnitStateIterator getTextureUnitStateIterator(
void);
603 ConstTextureUnitStateIterator getTextureUnitStateIterator(
void)
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
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 mTransparentSorting
Transparent depth sorting.
bool mAlphaToCoverageEnabled
bool hasFragmentProgram(void) const
Returns true if this pass uses a programmable fragment pipeline.
BuiltinHashFunction
There are some default hash functions used to order passes so that render state changes are minimised...
Part of the rendering which occurs per light.
Point light sources give off light equally in all directions, so require only position not direction...
Concrete IteratorWrapper for nonconst access to the underlying container.
static HashFunc * getHashFunction(void)
Get the hash function used for all passes.
GpuProgramUsage * mShadowCasterVertexProgramUsage
Vertex program details.
void setEmissive(Real red, Real green, Real blue)
Sets the amount of self-illumination an object has.
Class defining a single pass of a Technique (of a Material), i.e.
Try to minimise the number of texture changes.
SceneBlendFactor mSourceBlendFactor
UserObjectBindings & getUserObjectBindings()
Return an instance of user objects binding associated with this class.
TextureFilterOptions
High-level filtering options providing shortcuts to settings the minification, magnification and mip ...
void setLightClipPlanesEnabled(bool enabled)
Gets whether or not this pass will be clipped by user clips planes bounding the area covered by the l...
bool getLightScissoringEnabled() const
Gets whether or not this pass will be clipped by a scissor rectangle encompassing the lights that are...
Part of the rendering which occurs without any kind of direct lighting.
bool getIteratePerLight(void) const
Does this pass run once for every light in range?
static const PassSet & getDirtyHashList(void)
Static method to retrieve all the Passes which need their hash values recalculated.
bool mNormaliseNormals
Normalisation.
vector< TextureUnitState * >::type TextureUnitStates
Storage of texture unit states.
bool hasGeometryProgram(void) const
Returns true if this pass uses a programmable geometry pipeline.
Pass * originalPass
The original pass which spawned this one.
GpuProgramUsage * mShadowCasterFragmentProgramUsage
Fragment program details.
bool hasShadowReceiverFragmentProgram(void) const
Returns true if this pass uses a shadow receiver fragment program.
bool mQueuedForDeletion
Is this pass queued for deletion?
virtual ~HashFunc()
Need virtual destructor in case subclasses use it.
GpuProgramUsage * mShadowReceiverVertexProgramUsage
Vertex program details.
GpuProgramUsage * mFragmentProgramUsage
Fragment program details.
static HashFunc * msHashFunc
The Pass hash functor.
Class representing colour.
float Real
Software floating point type.
uint32 mLightMask
With a specific light mask?
const String & getName(void) const
Get the name of the pass.
SceneBlendFactor mDestBlendFactor
SceneBlendType
Types of blending that you can specify between an object and the existing contents of the scene...
Definition of a functor for calculating the hashcode of a Pass.
bool mLightClipPlanes
User clip planes for light?
virtual void setPolygonModeOverrideable(bool override)
Sets whether this pass's chosen detail level can be overridden (downgraded) by the camera setting...
GpuProgramUsage * mShadowReceiverFragmentProgramUsage
Fragment program details.
Real mPointSize
Point size, applies when not using per-vertex point size.
bool mRunOnlyForOneLightType
Should it only be run for a certain light type?
IlluminationStage mIlluminationStage
Illumination stage?
GpuProgramUsage * mGeometryProgramUsage
Geometry program details.
GpuProgramUsage * mTesselationDomainProgramUsage
Tesselation domain program details.
vector< unsigned short >::type ContentTypeLookup
void setIlluminationStage(IlluminationStage is)
Manually set which illumination stage this pass is a member of.
GpuProgramUsage * mTesselationHullProgramUsage
Tesselation hull program details.
SceneBlendOperation mBlendOperation
UserObjectBindings mUserObjectBindings
User objects binding.
unsigned short mLightsPerIteration
Iterate per how many lights?
static const ColourValue White
vector< IlluminationPass * >::type IlluminationPassList
bool destroyOnShutdown
Whether this pass is one which should be deleted itself.
bool getLightClipPlanesEnabled() const
Gets whether or not this pass will be clipped by user clips planes bounding the area covered by the l...
bool mLightScissoring
Scissoring for the light?
bool mPointSpritesEnabled
unsigned short getIndex(void) const
Gets the index of this Pass in the parent Technique.
SceneBlendOperation mAlphaBlendOperation
static PassSet msPassGraveyard
The place where passes go to die.
TrackVertexColourType mTracking
CompareFunction getAlphaRejectFunction(void) const
Gets the alpha reject function.
TextureUnitStates mTextureUnitStates
CullingMode
Hardware culling modes based on vertex winding.
Class representing the state of a single texture unit during a Pass of a Technique, of a Material.
unsigned short getNumTextureUnitStates(void) const
Returns the number of texture unit settings.
ContentTypeLookup mShadowContentTypeLookup
bool mTransparentSortingForced
Transparent depth sorting forced.
static const PassSet & getPassGraveyard(void)
Static method to retrieve all the Passes which are pending deletion.
bool mPolygonModeOverrideable
Light::LightTypes mOnlyLightType
ManualCullingMode mManualCullMode
bool mPointAttenuationEnabled
int TrackVertexColourType
An enumeration describing which material properties should track the vertex colours.
map< String, String >::type AliasTextureNamePairList
Alias / Texture name pair (first = alias, second = texture name)
bool isProgrammable(void) const
Returns true if this pass is programmable i.e. includes either a vertex or fragment program...
static PassSet msDirtyHashList
List of Passes whose hashes need recalculating.
void setNormaliseNormals(bool normalise)
If set to true, this forces normals to be normalised dynamically by the hardware for this pass...
bool getNormaliseNormals(void) const
Returns true if this pass has auto-normalisation of normals set.
bool hasShadowCasterVertexProgram(void) const
Returns true if this pass uses a shadow caster vertex program.
unsigned short mStartLight
Starting light index.
IlluminationStage getIlluminationStage() const
Get the manually assigned illumination stage, if any.
uint32 getHash(void) const
Gets the 'hash' of this pass, ie a precomputed number to use for sorting.
void setPassIterationCount(const size_t count)
set the number of iterations that this pass should perform when doing fast multi pass operation...
CompareFunction
Comparison functions used for the depth/stencil buffer operations and others.
void setEmissive(const ColourValue &emissive)
Sets the amount of self-illumination an object has.
bool mHashDirtyQueued
Pass hash.
bool isAlphaToCoverageEnabled() const
Gets whether to use alpha to coverage (A2C) when blending alpha rejected values.
ShadeOptions mShadeOptions
Shading options.
bool mColourWrite
Colour buffer settings.
bool hasTesselationDomainProgram(void) const
Returns true if this pass uses a programmable tesselation control pipeline.
void setLightScissoringEnabled(bool enabled)
Sets whether or not this pass will be clipped by a scissor rectangle encompassing the lights that are...
ConstVectorIterator< TextureUnitStates > ConstTextureUnitStateIterator
bool mSeparateBlendOperation
Determines if we should use separate blending operations for color and alpha channels.
Technique * getParent(void) const
Gets the parent Technique.
VectorIterator< TextureUnitStates > TextureUnitStateIterator
const UserObjectBindings & getUserObjectBindings() const
Return an instance of user objects binding associated with this class.
float mDepthBiasPerIteration
const ColourValue & getEmissive(void) const
Gets the self illumination colour of the pass.
size_t getPassIterationCount(void) const
Gets the pass iteration count value.
float mDepthBiasSlopeScale
ManualCullingMode
Manual culling modes based on vertex normals.
bool mLightingEnabled
Lighting enabled?
size_t mPassIterationCount
Number of pass iterations to perform.
Pass * pass
The pass to use in this stage.
Struct recording a pass which can be used for a specific illumination stage.
CompareFunction mAlphaRejectFunc
GpuProgramUsage * mComputeProgramUsage
Compute program details.
SceneBlendFactor mDestBlendFactorAlpha
unsigned char mAlphaRejectVal
SceneBlendFactor
Blending factors for manually blending objects with the scene.
virtual bool getPolygonModeOverrideable(void) const
Gets whether this renderable's chosen detail level can be overridden (downgraded) by the camera setti...
bool hasShadowReceiverVertexProgram(void) const
Returns true if this pass uses a shadow receiver vertex program.
#define OGRE_STATIC_MUTEX(name)
bool hasTesselationHullProgram(void) const
Returns true if this pass uses a programmable tesselation control pipeline.
bool mIteratePerLight
Run this pass once per light?
GpuProgramUsage * mVertexProgramUsage
Vertex program details.
LightTypes
Defines the type of light.
Light::LightTypes getOnlyLightType() const
Gets the single light type this pass runs for if getIteratePerLight and getRunOnlyForOneLightType are...
Concrete IteratorWrapper for const access to the underlying container.
set< Pass * >::type PassSet
Class that provides convenient interface to establish a linkage between custom user application objec...
unsigned char getAlphaRejectValue(void) const
Gets the alpha reject value.
IlluminationStage
Categorisation of passes for the purpose of additive lighting.
CompareFunction mDepthFunc
SceneBlendFactor mSourceBlendFactorAlpha
PolygonMode mPolygonMode
Polygon mode.
Class representing an approach to rendering this particular Material.
uint32 mHash
Optional name for the pass.
bool hasComputeProgram(void) const
Returns true if this pass uses a programmable compute pipeline.
bool hasShadowCasterFragmentProgram(void) const
Returns true if this pass uses a shadow caster fragment program.
ShadeOptions
Light shading modes.
PolygonMode
The polygon mode to use when rasterising.
SceneBlendOperation
Blending operations controls how objects are blended into the scene.
This utility class is used to hold the information used to generate the matrices and other informatio...
This class makes the usage of a vertex and fragment programs (low-level or high-level), with a given set of parameters, explicit.
bool getRunOnlyForOneLightType(void) const
Does this pass run only for a single light type (if getIteratePerLight is true).
bool mContentTypeLookupBuilt
static void setHashFunction(HashFunc *hashFunc)
Set the hash function used for all passes.
ColourValue mAmbient
Needs to be dirtied when next loaded.
ContentType
Enum identifying the type of content this texture unit contains.
unsigned short mMaxSimultaneousLights
Max simultaneous lights.
Superclass for all objects that wish to use custom memory allocators when their new / delete operator...
bool hasVertexProgram(void) const
Returns true if this pass uses a programmable vertex pipeline.