Go to the documentation of this file.
28 #ifndef __Technique_H__
29 #define __Technique_H__
59 IPS_COMPILE_DISABLED = -1,
129 : vendor(
GPU_UNKNOWN), includeOrExclude(EXCLUDE) {}
131 : vendor(v), includeOrExclude(ie) {}
140 : includeOrExclude(EXCLUDE), caseSensitive(false) {}
142 : devicePattern(pattern), includeOrExclude(ie), caseSensitive(caseSen) {}
199 bool movePass(
const unsigned short sourceIndex,
const unsigned short destinationIndex);
470 Real expDensity = 0.001,
Real linearStart = 0.0,
Real linearEnd = 1.0 );
void setSpecular(const ColourValue &specular)
Sets the specular colour reflectance properties of every Pass in every Technique.
void _unload(void)
Internal unload method, derived from call to Material::unload.
const IlluminationPassIterator getIlluminationPassIterator(void)
Gets an iterator over the illumination-stage categorised passes.
GPUDeviceNameRule(const String &pattern, IncludeOrExclude ie, bool caseSen)
VectorIterator< IlluminationPassList > IlluminationPassIterator
vector< GPUVendorRule >::type GPUVendorRuleList
Superclass for all objects that wish to use custom memory allocators when their new / delete operator...
Pass * getPass(const String &name)
Retrieves the Pass matching name.
void setSeparateSceneBlending(const SceneBlendFactor sourceFactor, const SceneBlendFactor destFactor, const SceneBlendFactor sourceFactorAlpha, const SceneBlendFactor destFactorAlpha)
Allows very fine control of blending every Pass with the existing contents of the scene,...
const PassIterator getPassIterator(void)
Gets an iterator over the passes in this Technique.
void setShadingMode(ShadeOptions mode)
Sets the type of light shading required.
void setSelfIllumination(const ColourValue &selfIllum)
Sets the amount of self-illumination of every Pass in every Technique.
void setShadowCasterMaterial(const Ogre::String &name)
set this material specific shadow casting specific material
bool isDepthWriteEnabled(void) const
Is depth writing going to occur on this technique?
void setSeparateSceneBlending(const SceneBlendType sbt, const SceneBlendType sbta)
Sets the kind of blending every pass has with the existing contents of the scene, using individual fa...
IncludeOrExclude includeOrExclude
vector< Pass * >::type Passes
ConstVectorIterator< GPUDeviceNameRuleList > GPUDeviceNameRuleIterator
void setPointSize(Real ps)
Sets the point size properties for every Pass in this Technique.
void removePass(unsigned short index)
Removes the Pass with the given index.
GPUVendorRuleIterator getGPUVendorRuleIterator() const
Get an iterator over the currently registered vendor rules.
UserObjectBindings mUserObjectBindings
size_t calculateSize(void) const
void setSceneBlending(const SceneBlendFactor sourceFactor, const SceneBlendFactor destFactor)
Allows very fine control of blending every Pass with the existing contents of the scene.
IlluminationPassList mIlluminationPasses
List of derived passes, categorised into IlluminationStage (ordered)
bool applyTextureAliases(const AliasTextureNamePairList &aliasList, const bool apply=true) const
Applies texture names to Texture Unit State with matching texture name aliases.
Concrete IteratorWrapper for nonconst access to the underlying container.
void _prepare(void)
Internal prepare method, derived from call to Material::prepare.
MaterialPtr mShadowCasterMaterial
When casting shadow, if not using default Ogre shadow casting material, or nor using fixed function c...
GPUVendor
Enumeration of GPU vendors.
Class encapsulates rendering properties of an object.
String mName
Optional name for the technique.
Technique & operator=(const Technique &rhs)
Overloaded operator to copy on Technique to another.
bool checkHardwareSupport(bool autoManageTextureUnits, StringUtil::StrStreamType &compileErrors)
Internal method for checking hardware support.
void _compileIlluminationPasses(void)
Internal method for splitting the passes into illumination passes.
void addGPUVendorRule(const GPUVendorRule &rule)
Add a rule which manually influences the support for this technique based on a GPU vendor.
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)
Sets the fogging mode applied to each pass.
TextureFilterOptions
High-level filtering options providing shortcuts to settings the minification, magnification and mip ...
vector< IlluminationPass * >::type IlluminationPassList
unsigned short mSchemeIndex
Scheme index, derived from scheme name but the names are held on MaterialManager, for speed an index ...
UserObjectBindings & getUserObjectBindings()
Return an instance of user objects binding associated with this class.
StringStream StrStreamType
Class defining a single pass of a Technique (of a Material), i.e.
Class representing an approach to rendering this particular Material.
IncludeOrExclude
Directive used to manually control technique support based on the inclusion or exclusion of some fact...
Class that provides convenient interface to establish a linkage between custom user application objec...
IlluminationPassesState
Illumination pass state type.
CompareFunction
Comparison functions used for the depth/stencil buffer operations and others.
void setDepthFunction(CompareFunction func)
Sets the function used to compare depth values when depth checking is on.
void setSelfIllumination(Real red, Real green, Real blue)
Sets the amount of self-illumination of every Pass in every Technique.
Rule controlling whether technique is deemed supported based on GPU device name.
void setDiffuse(Real red, Real green, Real blue, Real alpha)
Sets the diffuse colour reflectance properties of every Pass in every Technique.
VectorIterator< Passes > PassIterator
Pass * getPass(unsigned short index)
Retrieves the Pass with the given index.
unsigned short getNumPasses(void) const
Retrieves the number of passes.
GPUDeviceNameRuleIterator getGPUDeviceNameRuleIterator() const
Get an iterator over the currently registered device name rules.
bool checkGPURules(StringUtil::StrStreamType &errors)
Internal method for checking GPU vendor / device rules.
Technique(Material *parent)
Constructor.
unsigned short getLodIndex(void) const
Gets the level-of-detail index assigned to this Technique.
SceneBlendFactor
Blending factors for manually blending objects with the scene.
bool checkManuallyOrganisedIlluminationPasses()
Internal method - check for manually assigned illumination passes.
void setDepthCheckEnabled(bool enabled)
Sets whether or not each Pass renders with depth-buffer checking on or not.
void clearIlluminationPasses(void)
Internal method for clearing illumination pass list.
void addGPUDeviceNameRule(const GPUDeviceNameRule &rule)
Add a rule which manually influences the support for this technique based on a pattern that matches a...
void setLodIndex(unsigned short index)
Assigns a level-of-detail (LOD) index to this Technique.
void _unprepare(void)
Internal unprepare method, derived from call to Material::unprepare.
GPUVendorRule(GPUVendor v, IncludeOrExclude ie)
map< String, String >::type AliasTextureNamePairList
Alias / Texture name pair (first = alias, second = texture name)
void setLightingEnabled(bool enabled)
Sets whether or not dynamic lighting is enabled for every Pass.
bool isTransparent(void) const
Returns true if this Technique involves transparency.
bool isTransparentSortingEnabled(void) const
Returns true if this Technique has transparent sorting enabled.
MaterialPtr mShadowReceiverMaterial
When receiving shadow, if not using default Ogre shadow receiving material, or nor using fixed functi...
String mShadowCasterMaterialName
When casting shadow, if not using default Ogre shadow casting material, or nor using fixed function c...
bool movePass(const unsigned short sourceIndex, const unsigned short destinationIndex)
Move a pass from source index to destination index.
bool hasColourWriteDisabled(void) const
Exists colour writing disabled pass on this technique?
void setCullingMode(CullingMode mode)
Sets the culling mode for each pass based on the 'vertex winding'.
void setDiffuse(const ColourValue &diffuse)
Sets the diffuse colour reflectance properties of every Pass in every Technique.
void setDepthWriteEnabled(bool enabled)
Sets whether or not each Pass renders with depth-buffer writing on or not.
void setSchemeName(const String &schemeName)
Set the 'scheme name' for this technique.
void setColourWriteEnabled(bool enabled)
Sets whether or not colour buffer writing is enabled for each Pass.
IncludeOrExclude includeOrExclude
void setTextureAnisotropy(unsigned int maxAniso)
Sets the anisotropy level to be used for all textures.
Material * getParent(void) const
Gets the parent Material.
const String & getResourceGroup(void) const
Gets the resource group of the ultimate parent Material.
CullingMode
Hardware culling modes based on vertex winding.
unsigned short mLodIndex
LOD level.
void _load(void)
Internal load method, derived from call to Material::load.
void setSpecular(Real red, Real green, Real blue, Real alpha)
Sets the specular colour reflectance properties of every Pass in every Technique.
Technique(Material *parent, const Technique &oth)
Copy constructor.
void addGPUDeviceNameRule(const String &devicePattern, IncludeOrExclude includeOrExclude, bool caseSensitive=false)
Add a rule which manually influences the support for this technique based on a pattern that matches a...
static const ColourValue White
String mShadowReceiverMaterialName
When receiving shadow, if not using default Ogre shadow receiving material, or nor using fixed functi...
unsigned short _getSchemeIndex(void) const
Internal method for getting the scheme index.
void addGPUVendorRule(GPUVendor vendor, IncludeOrExclude includeOrExclude)
Add a rule which manually influences the support for this technique based on a GPU vendor.
Ogre::MaterialPtr getShadowReceiverMaterial() const
return this material specific shadow receiving specific material
vector< GPUDeviceNameRule >::type GPUDeviceNameRuleList
String _compile(bool autoManageTextureUnits)
Internal compilation method; see Material::compile.
void setShadowCasterMaterial(Ogre::MaterialPtr val)
set this material specific shadow casting specific material
void removeGPUDeviceNameRule(const String &devicePattern)
Removes a matching device name rule.
void setName(const String &name)
Set the name of the technique.
void setShadowReceiverMaterial(Ogre::MaterialPtr val)
set this material specific shadow receiving specific material
void setAmbient(Real red, Real green, Real blue)
Sets the ambient colour reflectance properties for every Pass in every Technique.
Class representing colour.
void removeAllPasses(void)
Removes all Passes from this Technique.
void setShininess(Real val)
Sets the shininess properties of every Pass in every Technique.
void setShadowReceiverMaterial(const Ogre::String &name)
set this material specific shadow receiving specific material
void setTextureFiltering(TextureFilterOptions filterType)
Set texture filtering for every texture unit in every Pass.
ShadeOptions
Light shading modes.
Passes mPasses
List of primary passes.
const UserObjectBindings & getUserObjectBindings() const
Return an instance of user objects binding associated with this class.
GPUDeviceNameRuleList mGPUDeviceNameRules
ManualCullingMode
Manual culling modes based on vertex normals.
float Real
Software floating point type.
void setDepthBias(float constantBias, float slopeScaleBias)
Sets the depth bias to be used for each Pass.
void removeGPUVendorRule(GPUVendor vendor)
Removes a matching vendor rule.
bool isDepthCheckEnabled(void) const
Is depth checking going to occur on this technique?
bool isLoaded(void) const
Is this loaded?
GPUVendorRuleList mGPUVendorRules
Ogre::MaterialPtr getShadowCasterMaterial() const
return this material specific shadow casting specific material
ConstVectorIterator< GPUVendorRuleList > GPUVendorRuleIterator
IlluminationPassesState mIlluminationPassesCompilationPhase
bool isSupported(void) const
Indicates if this technique is supported by the current graphics card.
Rule controlling whether technique is deemed supported based on GPU vendor.
const String & getName(void) const
Gets the name of the technique.
bool isTransparentSortingForced(void) const
Returns true if this Technique has transparent sorting forced.
void setManualCullingMode(ManualCullingMode mode)
Sets the manual culling mode, performed by CPU rather than hardware.
void setSceneBlending(const SceneBlendType sbt)
Sets the kind of blending every pass has with the existing contents of the scene.
void _notifyNeedsRecompile(void)
Tells the technique that it needs recompilation.
Pass * createPass(void)
Creates a new Pass for this Technique.
Concrete IteratorWrapper for const access to the underlying container.
void setAmbient(const ColourValue &ambient)
Sets the ambient colour reflectance properties for every Pass in every Technique.
SceneBlendType
Types of blending that you can specify between an object and the existing contents of the scene.
const String & getSchemeName(void) const
Returns the scheme to which this technique is assigned.
Copyright © 2012 Torus Knot Software Ltd

This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.