95 virtual uint32 operator()(
const Pass* p)
const = 0;
226 Real mPointAttenuationCoeffs[3];
267 bool isProgrammable(
void)
const {
return mVertexProgramUsage || mFragmentProgramUsage || mGeometryProgramUsage; }
285 unsigned short getIndex(
void)
const {
return mIndex; }
291 void setName(
const String& name);
379 void setShininess(
Real val);
390 void setSelfIllumination(
Real red,
Real green,
Real blue);
398 setSelfIllumination(red, green, blue);
410 void setSelfIllumination(
const ColourValue& selfIllum);
418 setSelfIllumination(emissive);
430 Real getPointSize(
void)
const;
447 void setPointSize(
Real ps);
454 void setPointSpritesEnabled(
bool enabled);
459 bool getPointSpritesEnabled(
void)
const;
477 void setPointAttenuation(
bool enabled,
478 Real constant = 0.0f,
Real linear = 1.0f,
Real quadratic = 0.0f);
481 bool isPointAttenuationEnabled(
void)
const;
484 Real getPointAttenuationConstant(
void)
const;
486 Real getPointAttenuationLinear(
void)
const;
488 Real getPointAttenuationQuadratic(
void)
const;
491 void setPointMinSize(
Real min);
493 Real getPointMinSize(
void)
const;
497 void setPointMaxSize(
Real max);
501 Real getPointMaxSize(
void)
const;
517 const ColourValue& getSelfIllumination(
void)
const;
525 return getSelfIllumination();
530 Real getShininess(
void)
const;
579 unsigned short getTextureUnitStateIndex(
const TextureUnitState* state)
const;
593 void removeTextureUnitState(
unsigned short index);
597 void removeAllTextureUnitStates(
void);
603 return static_cast<unsigned short>(mTextureUnitStates.size());
697 bool hasSeparateSceneBlending()
const;
743 bool hasSeparateSceneBlendingOperations()
const;
752 bool isTransparent(
void)
const;
765 void setDepthCheckEnabled(
bool enabled);
771 bool getDepthCheckEnabled(
void)
const;
783 void setDepthWriteEnabled(
bool enabled);
789 bool getDepthWriteEnabled(
void)
const;
815 void setColourWriteEnabled(
bool enabled);
817 bool getColourWriteEnabled(
void)
const;
867 void setLightingEnabled(
bool enabled);
871 bool getLightingEnabled(
void)
const;
881 void setMaxSimultaneousLights(
unsigned short maxLights);
883 unsigned short getMaxSimultaneousLights(
void)
const;
895 void setStartLight(
unsigned short startLight);
897 unsigned short getStartLight(
void)
const;
900 void setLightMask(
uint32 mask);
902 uint32 getLightMask()
const;
931 mPolygonModeOverrideable =
override;
939 return mPolygonModeOverrideable;
974 Real expDensity = 0.001,
Real linearStart = 0.0,
Real linearEnd = 1.0 );
978 bool getFogOverride(
void)
const;
984 FogMode getFogMode(
void)
const;
994 Real getFogStart(
void)
const;
1000 Real getFogEnd(
void)
const;
1006 Real getFogDensity(
void)
const;
1027 void setDepthBias(
float constantBias,
float slopeScaleBias = 0.0f);
1030 float getDepthBiasConstant(
void)
const;
1032 float getDepthBiasSlopeScale(
void)
const;
1039 void setIterationDepthBias(
float biasPerIteration);
1043 float getIterationDepthBias()
const;
1054 void setAlphaRejectSettings(
CompareFunction func,
unsigned char value,
bool alphaToCoverageEnabled =
false);
1062 void setAlphaRejectValue(
unsigned char val);
1079 void setAlphaToCoverageEnabled(
bool enabled);
1097 void setTransparentSortingEnabled(
bool enabled);
1101 bool getTransparentSortingEnabled(
void)
const;
1112 void setTransparentSortingForced(
bool enabled);
1116 bool getTransparentSortingForced(
void)
const;
1160 void setIteratePerLight(
bool enabled,
1180 void setLightCountPerIteration(
unsigned short c);
1184 unsigned short getLightCountPerIteration(
void)
const;
1190 const String& getResourceGroup(
void)
const;
1208 void setVertexProgram(
const String& name,
bool resetParams =
true);
1217 const String& getVertexProgramName(
void)
const;
1253 void setShadowCasterVertexProgram(
const String& name);
1262 const String& getShadowCasterVertexProgramName(
void)
const;
1267 const GpuProgramPtr& getShadowCasterVertexProgram(
void)
const;
1298 void setShadowCasterFragmentProgram(
const String& name);
1307 const String& getShadowCasterFragmentProgramName(
void)
const;
1312 const GpuProgramPtr& getShadowCasterFragmentProgram(
void)
const;
1339 void setShadowReceiverVertexProgram(
const String& name);
1368 void setShadowReceiverFragmentProgram(
const String& name);
1378 const String& getShadowReceiverVertexProgramName(
void)
const;
1383 const GpuProgramPtr& getShadowReceiverVertexProgram(
void)
const;
1386 const String& getShadowReceiverFragmentProgramName(
void)
const;
1391 const GpuProgramPtr& getShadowReceiverFragmentProgram(
void)
const;
1409 void setFragmentProgram(
const String& name,
bool resetParams =
true);
1416 const String& getFragmentProgramName(
void)
const;
1438 void setGeometryProgram(
const String& name,
bool resetParams =
true);
1445 const String& getGeometryProgramName(
void)
const;
1462 Pass* _split(
unsigned short numUnits);
1465 void _notifyIndex(
unsigned short index);
1468 void _prepare(
void);
1470 void _unprepare(
void);
1476 bool isLoaded(
void)
const;
1486 void _dirtyHash(
void);
1493 void _recalculateHash(
void);
1495 void _notifyNeedsRecompile(
void);
1509 unsigned short _getTextureUnitWithContentTypeIndex(
1529 void setTextureAnisotropy(
unsigned int maxAniso);
1550 {
return msDirtyHashList; }
1554 {
return msPassGraveyard; }
1562 static void clearDirtyHashList(
void);
1565 static void processPendingPassUpdates(
void);
1568 void queueForDeletion(
void);
1572 bool isAmbientOnly(
void)
const;
1696 MIN_GPU_PROGRAM_CHANGE
1710 static void setHashFunction(BuiltinHashFunction builtin);
1731 static HashFunc* getBuiltinHashFunction(BuiltinHashFunction builtin);
bool mSeparateBlendOperation
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.
static HashFunc * msHashFunc
The Pass hash functor.
bool hasShadowCasterFragmentProgram(void) const
Returns true if this pass uses a shadow caster fragment program.
SceneBlendOperation mAlphaBlendOperation
set< Pass * >::type PassSet
Specialisation of SharedPtr to allow SharedPtr to be assigned to GpuProgramPtr.
vector< unsigned short >::type ContentTypeLookup
bool mNormaliseNormals
Normalisation.
Class representing colour.
static const ColourValue White
GpuProgramUsage * mVertexProgramUsage
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
bool hasGeometryProgram(void) const
Returns true if this pass uses a programmable geometry pipeline.
Technique * getParent(void) const
Gets the parent Technique.
GpuProgramUsage * mShadowCasterVertexProgramUsage
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
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.
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
SceneBlendFactor mDestBlendFactor
static PassSet msPassGraveyard
The place where passes go to die.
#define OGRE_STATIC_MUTEX(name)
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
bool mLightScissoring
Scissoring for the light?
bool mAlphaToCoverageEnabled
SceneBlendFactor mDestBlendFactorAlpha
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
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
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?
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.
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.
static const PassSet & getPassGraveyard(void)
Static method to retrieve all the Passes which are pending deletion.
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
size_t mPassIterationCount
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
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
int TrackVertexColourType
An enumeration describing which material properties should track the vertex colours.
bool mLightingEnabled
Lighting enabled?
PolygonMode mPolygonMode
Polygon mode.
GpuProgramUsage * mShadowCasterFragmentProgramUsage
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.
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 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 ...
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