OGRE
1.11.6
Object-Oriented Graphics Rendering Engine
|
Class representing an approach to rendering this particular Material. More...
#include <OgreTechnique.h>
Classes | |
struct | GPUDeviceNameRule |
Rule controlling whether technique is deemed supported based on GPU device name. More... | |
struct | GPUVendorRule |
Rule controlling whether technique is deemed supported based on GPU vendor. More... | |
Public Types | |
typedef ConstVectorIterator< GPUDeviceNameRuleList > | GPUDeviceNameRuleIterator |
typedef std::vector< GPUDeviceNameRule > | GPUDeviceNameRuleList |
typedef ConstVectorIterator< GPUVendorRuleList > | GPUVendorRuleIterator |
typedef std::vector< GPUVendorRule > | GPUVendorRuleList |
typedef VectorIterator< IlluminationPassList > | IlluminationPassIterator |
enum | IncludeOrExclude { INCLUDE = 0, EXCLUDE = 1 } |
Directive used to manually control technique support based on the inclusion or exclusion of some factor. More... | |
typedef std::vector< Pass * > | Passes |
typedef VectorIterator< Passes > | PassIterator |
Public Member Functions | |
Technique (Material *parent) | |
Constructor. More... | |
Technique (Material *parent, const Technique &oth) | |
Copy constructor. More... | |
~Technique () | |
String | _compile (bool autoManageTextureUnits) |
Internal compilation method; see Material::compile. More... | |
void | _compileIlluminationPasses (void) |
Internal method for splitting the passes into illumination passes. More... | |
unsigned short | _getSchemeIndex (void) const |
Internal method for getting the scheme index. More... | |
void | _load (void) |
Internal load method, derived from call to Material::load. More... | |
void | _notifyNeedsRecompile (void) |
Tells the technique that it needs recompilation. More... | |
void | _prepare (void) |
Internal prepare method, derived from call to Material::prepare. More... | |
void | _unload (void) |
Internal unload method, derived from call to Material::unload. More... | |
void | _unprepare (void) |
Internal unprepare method, derived from call to Material::unprepare. More... | |
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 GPU device name (e.g. More... | |
void | addGPUDeviceNameRule (const GPUDeviceNameRule &rule) |
void | addGPUVendorRule (GPUVendor vendor, IncludeOrExclude includeOrExclude) |
Add a rule which manually influences the support for this technique based on a GPU vendor. More... | |
void | addGPUVendorRule (const GPUVendorRule &rule) |
Add a rule which manually influences the support for this technique based on a GPU vendor. More... | |
bool | applyTextureAliases (const AliasTextureNamePairList &aliasList, const bool apply=true) const |
Applies texture names to Texture Unit State with matching texture name aliases. More... | |
size_t | calculateSize (void) const |
bool | checkGPURules (StringStream &errors) |
Internal method for checking GPU vendor / device rules. More... | |
bool | checkHardwareSupport (bool autoManageTextureUnits, StringStream &compileErrors) |
Internal method for checking hardware support. More... | |
Pass * | createPass (void) |
Creates a new Pass for this Technique. More... | |
GPUDeviceNameRuleIterator | getGPUDeviceNameRuleIterator () const |
Get an iterator over the currently registered device name rules. More... | |
const GPUDeviceNameRuleList & | getGPUDeviceNameRules () const |
Get the currently registered device name rules. More... | |
GPUVendorRuleIterator | getGPUVendorRuleIterator () const |
Get an iterator over the currently registered vendor rules. More... | |
const GPUVendorRuleList & | getGPUVendorRules () const |
Get the currently registered vendor rules. More... | |
const IlluminationPassList & | getIlluminationPasses () |
Gets the illumination-stage categorised passes. More... | |
const IlluminationPassIterator | getIlluminationPassIterator (void) |
Gets an iterator over the illumination-stage categorised passes. More... | |
unsigned short | getLodIndex (void) const |
Gets the level-of-detail index assigned to this Technique. More... | |
const String & | getName (void) const |
Gets the name of the technique. More... | |
unsigned short | getNumPasses (void) const |
Retrieves the number of passes. More... | |
Material * | getParent (void) const |
Gets the parent Material. More... | |
Pass * | getPass (unsigned short index) const |
Retrieves the Pass with the given index. More... | |
Pass * | getPass (const String &name) const |
Retrieves the Pass matching name. More... | |
const Passes & | getPasses (void) const |
Gets the passes in this Technique. More... | |
const PassIterator | getPassIterator (void) |
Gets an iterator over the passes in this Technique. More... | |
const String & | getResourceGroup (void) const |
Gets the resource group of the ultimate parent Material. More... | |
const String & | getSchemeName (void) const |
Returns the scheme to which this technique is assigned. More... | |
Ogre::MaterialPtr | getShadowCasterMaterial () const |
return this material specific shadow casting specific material More... | |
Ogre::MaterialPtr | getShadowReceiverMaterial () const |
return this material specific shadow receiving specific material More... | |
UserObjectBindings & | getUserObjectBindings () |
Return an instance of user objects binding associated with this class. More... | |
const UserObjectBindings & | getUserObjectBindings () const |
Return an instance of user objects binding associated with this class. More... | |
bool | hasColourWriteDisabled (void) const |
Exists colour writing disabled pass on this technique? More... | |
bool | isDepthCheckEnabled (void) const |
Is depth checking going to occur on this technique? More... | |
bool | isDepthWriteEnabled (void) const |
Is depth writing going to occur on this technique? More... | |
bool | isLoaded (void) const |
Is this loaded? More... | |
bool | isSupported (void) const |
Indicates if this technique is supported by the current graphics card. More... | |
bool | isTransparent (void) const |
Returns true if this Technique involves transparency. More... | |
bool | isTransparentSortingEnabled (void) const |
Returns true if this Technique has transparent sorting enabled. More... | |
bool | isTransparentSortingForced (void) const |
Returns true if this Technique has transparent sorting forced. More... | |
bool | movePass (const unsigned short sourceIndex, const unsigned short destinationIndex) |
Move a pass from source index to destination index. More... | |
Technique & | operator= (const Technique &rhs) |
Overloaded operator to copy on Technique to another. More... | |
void | removeAllPasses (void) |
Removes all Passes from this Technique. More... | |
void | removeGPUDeviceNameRule (const String &devicePattern) |
Removes a matching device name rule. More... | |
void | removeGPUVendorRule (GPUVendor vendor) |
Removes a matching vendor rule. More... | |
void | removePass (unsigned short index) |
Removes the Pass with the given index. More... | |
void | setAmbient (float red, float green, float blue) |
Sets the ambient colour reflectance properties for every Pass in every Technique. More... | |
void | setAmbient (const ColourValue &ambient) |
void | setColourWriteEnabled (bool enabled) |
Sets whether or not colour buffer writing is enabled for each Pass. More... | |
void | setColourWriteEnabled (bool red, bool green, bool blue, bool alpha) |
Sets which colour buffer channels are enabled for writing for each Pass. More... | |
void | setCullingMode (CullingMode mode) |
Sets the culling mode for each pass based on the 'vertex winding'. More... | |
void | setDepthBias (float constantBias, float slopeScaleBias) |
Sets the depth bias to be used for each Pass. More... | |
void | setDepthCheckEnabled (bool enabled) |
Sets whether or not each Pass renders with depth-buffer checking on or not. More... | |
void | setDepthFunction (CompareFunction func) |
Sets the function used to compare depth values when depth checking is on. More... | |
void | setDepthWriteEnabled (bool enabled) |
Sets whether or not each Pass renders with depth-buffer writing on or not. More... | |
void | setDiffuse (float red, float green, float blue, float alpha) |
Sets the diffuse colour reflectance properties of every Pass in every Technique. More... | |
void | setDiffuse (const ColourValue &diffuse) |
void | setFog (bool overrideScene, FogMode mode=FOG_NONE, const ColourValue &colour=ColourValue::White, Real expDensity=0.001f, Real linearStart=0.0f, Real linearEnd=1.0f) |
Sets the fogging mode applied to each pass. More... | |
void | setLightingEnabled (bool enabled) |
Sets whether or not dynamic lighting is enabled for every Pass. More... | |
void | setLodIndex (unsigned short index) |
Assigns a level-of-detail (LOD) index to this Technique. More... | |
void | setManualCullingMode (ManualCullingMode mode) |
Sets the manual culling mode, performed by CPU rather than hardware. More... | |
void | setName (const String &name) |
Set the name of the technique. More... | |
void | setPointSize (Real ps) |
Sets the point size properties for every Pass in this Technique. More... | |
void | setSceneBlending (const SceneBlendType sbt) |
Sets the kind of blending every pass has with the existing contents of the scene. More... | |
void | setSceneBlending (const SceneBlendFactor sourceFactor, const SceneBlendFactor destFactor) |
Allows very fine control of blending every Pass with the existing contents of the scene. More... | |
void | setSchemeName (const String &schemeName) |
Set the 'scheme name' for this technique. More... | |
void | setSelfIllumination (float red, float green, float blue) |
Sets the amount of self-illumination of every Pass in every Technique. More... | |
void | setSelfIllumination (const ColourValue &selfIllum) |
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 factors both color and alpha channels. More... | |
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, using individual factors both color and alpha channels. More... | |
void | setShadingMode (ShadeOptions mode) |
Sets the type of light shading required. More... | |
void | setShadowCasterMaterial (Ogre::MaterialPtr val) |
set this material specific shadow casting specific material More... | |
void | setShadowCasterMaterial (const Ogre::String &name) |
set this material specific shadow casting specific material More... | |
void | setShadowReceiverMaterial (Ogre::MaterialPtr val) |
set this material specific shadow receiving specific material More... | |
void | setShadowReceiverMaterial (const Ogre::String &name) |
set this material specific shadow receiving specific material More... | |
void | setShininess (Real val) |
Sets the shininess properties of every Pass in every Technique. More... | |
void | setSpecular (float red, float green, float blue, float alpha) |
Sets the specular colour reflectance properties of every Pass in every Technique. More... | |
void | setSpecular (const ColourValue &specular) |
void | setTextureAnisotropy (unsigned int maxAniso) |
Sets the anisotropy level to be used for all textures. More... | |
void | setTextureFiltering (TextureFilterOptions filterType) |
Set texture filtering for every texture unit in every Pass. More... | |
Class representing an approach to rendering this particular Material.
typedef std::vector<Pass*> Ogre::Technique::Passes |
typedef std::vector<GPUVendorRule> Ogre::Technique::GPUVendorRuleList |
typedef std::vector<GPUDeviceNameRule> Ogre::Technique::GPUDeviceNameRuleList |
Ogre::Technique::Technique | ( | Material * | parent | ) |
Constructor.
Ogre::Technique::~Technique | ( | ) |
bool Ogre::Technique::isSupported | ( | void | ) | const |
Indicates if this technique is supported by the current graphics card.
String Ogre::Technique::_compile | ( | bool | autoManageTextureUnits | ) |
Internal compilation method; see Material::compile.
bool Ogre::Technique::checkGPURules | ( | StringStream & | errors | ) |
Internal method for checking GPU vendor / device rules.
bool Ogre::Technique::checkHardwareSupport | ( | bool | autoManageTextureUnits, |
StringStream & | compileErrors | ||
) |
Internal method for checking hardware support.
void Ogre::Technique::_compileIlluminationPasses | ( | void | ) |
Internal method for splitting the passes into illumination passes.
size_t Ogre::Technique::calculateSize | ( | void | ) | const |
Pass* Ogre::Technique::createPass | ( | void | ) |
Creates a new Pass for this Technique.
Pass* Ogre::Technique::getPass | ( | unsigned short | index | ) | const |
Retrieves the Pass with the given index.
Retrieves the Pass matching name.
Returns 0 if name match is not found.
unsigned short Ogre::Technique::getNumPasses | ( | void | ) | const |
Retrieves the number of passes.
void Ogre::Technique::removePass | ( | unsigned short | index | ) |
Removes the Pass with the given index.
void Ogre::Technique::removeAllPasses | ( | void | ) |
Removes all Passes from this Technique.
bool Ogre::Technique::movePass | ( | const unsigned short | sourceIndex, |
const unsigned short | destinationIndex | ||
) |
Move a pass from source index to destination index.
If successful then returns true.
const PassIterator Ogre::Technique::getPassIterator | ( | void | ) |
Gets an iterator over the passes in this Technique.
|
inline |
Gets an iterator over the illumination-stage categorised passes.
const IlluminationPassList& Ogre::Technique::getIlluminationPasses | ( | ) |
Gets the illumination-stage categorised passes.
|
inline |
Gets the parent Material.
References Ogre::FOG_NONE, and Ogre::ColourValue::White.
Overloaded operator to copy on Technique to another.
const String& Ogre::Technique::getResourceGroup | ( | void | ) | const |
Gets the resource group of the ultimate parent Material.
bool Ogre::Technique::isTransparent | ( | void | ) | const |
Returns true if this Technique involves transparency.
bool Ogre::Technique::isTransparentSortingEnabled | ( | void | ) | const |
Returns true if this Technique has transparent sorting enabled.
bool Ogre::Technique::isTransparentSortingForced | ( | void | ) | const |
Returns true if this Technique has transparent sorting forced.
void Ogre::Technique::_prepare | ( | void | ) |
Internal prepare method, derived from call to Material::prepare.
void Ogre::Technique::_unprepare | ( | void | ) |
Internal unprepare method, derived from call to Material::unprepare.
void Ogre::Technique::_load | ( | void | ) |
Internal load method, derived from call to Material::load.
void Ogre::Technique::_unload | ( | void | ) |
Internal unload method, derived from call to Material::unload.
bool Ogre::Technique::isLoaded | ( | void | ) | const |
Is this loaded?
void Ogre::Technique::_notifyNeedsRecompile | ( | void | ) |
Tells the technique that it needs recompilation.
Ogre::MaterialPtr Ogre::Technique::getShadowCasterMaterial | ( | ) | const |
return this material specific shadow casting specific material
void Ogre::Technique::setShadowCasterMaterial | ( | Ogre::MaterialPtr | val | ) |
set this material specific shadow casting specific material
void Ogre::Technique::setShadowCasterMaterial | ( | const Ogre::String & | name | ) |
set this material specific shadow casting specific material
Ogre::MaterialPtr Ogre::Technique::getShadowReceiverMaterial | ( | ) | const |
return this material specific shadow receiving specific material
void Ogre::Technique::setShadowReceiverMaterial | ( | Ogre::MaterialPtr | val | ) |
set this material specific shadow receiving specific material
void Ogre::Technique::setShadowReceiverMaterial | ( | const Ogre::String & | name | ) |
set this material specific shadow receiving specific material
void Ogre::Technique::setPointSize | ( | Real | ps | ) |
Sets the point size properties for every Pass in this Technique.
void Ogre::Technique::setAmbient | ( | float | red, |
float | green, | ||
float | blue | ||
) |
Sets the ambient colour reflectance properties for every Pass in every Technique.
void Ogre::Technique::setAmbient | ( | const ColourValue & | ambient | ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
void Ogre::Technique::setDiffuse | ( | float | red, |
float | green, | ||
float | blue, | ||
float | alpha | ||
) |
Sets the diffuse colour reflectance properties of every Pass in every Technique.
void Ogre::Technique::setDiffuse | ( | const ColourValue & | diffuse | ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
void Ogre::Technique::setSpecular | ( | float | red, |
float | green, | ||
float | blue, | ||
float | alpha | ||
) |
Sets the specular colour reflectance properties of every Pass in every Technique.
void Ogre::Technique::setSpecular | ( | const ColourValue & | specular | ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
void Ogre::Technique::setShininess | ( | Real | val | ) |
Sets the shininess properties of every Pass in every Technique.
void Ogre::Technique::setSelfIllumination | ( | float | red, |
float | green, | ||
float | blue | ||
) |
Sets the amount of self-illumination of every Pass in every Technique.
void Ogre::Technique::setSelfIllumination | ( | const ColourValue & | selfIllum | ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
void Ogre::Technique::setDepthCheckEnabled | ( | bool | enabled | ) |
Sets whether or not each Pass renders with depth-buffer checking on or not.
void Ogre::Technique::setDepthWriteEnabled | ( | bool | enabled | ) |
Sets whether or not each Pass renders with depth-buffer writing on or not.
void Ogre::Technique::setDepthFunction | ( | CompareFunction | func | ) |
Sets the function used to compare depth values when depth checking is on.
void Ogre::Technique::setColourWriteEnabled | ( | bool | enabled | ) |
Sets whether or not colour buffer writing is enabled for each Pass.
void Ogre::Technique::setColourWriteEnabled | ( | bool | red, |
bool | green, | ||
bool | blue, | ||
bool | alpha | ||
) |
Sets which colour buffer channels are enabled for writing for each Pass.
void Ogre::Technique::setCullingMode | ( | CullingMode | mode | ) |
Sets the culling mode for each pass based on the 'vertex winding'.
void Ogre::Technique::setManualCullingMode | ( | ManualCullingMode | mode | ) |
Sets the manual culling mode, performed by CPU rather than hardware.
void Ogre::Technique::setLightingEnabled | ( | bool | enabled | ) |
Sets whether or not dynamic lighting is enabled for every Pass.
void Ogre::Technique::setShadingMode | ( | ShadeOptions | mode | ) |
Sets the type of light shading required.
void Ogre::Technique::setFog | ( | bool | overrideScene, |
FogMode | mode = FOG_NONE , |
||
const ColourValue & | colour = ColourValue::White , |
||
Real | expDensity = 0.001f , |
||
Real | linearStart = 0.0f , |
||
Real | linearEnd = 1.0f |
||
) |
Sets the fogging mode applied to each pass.
void Ogre::Technique::setDepthBias | ( | float | constantBias, |
float | slopeScaleBias | ||
) |
Sets the depth bias to be used for each Pass.
void Ogre::Technique::setTextureFiltering | ( | TextureFilterOptions | filterType | ) |
Set texture filtering for every texture unit in every Pass.
void Ogre::Technique::setTextureAnisotropy | ( | unsigned int | maxAniso | ) |
Sets the anisotropy level to be used for all textures.
void Ogre::Technique::setSceneBlending | ( | const SceneBlendType | sbt | ) |
Sets the kind of blending every pass has with the existing contents of the scene.
void Ogre::Technique::setSeparateSceneBlending | ( | const SceneBlendType | sbt, |
const SceneBlendType | sbta | ||
) |
Sets the kind of blending every pass has with the existing contents of the scene, using individual factors both color and alpha channels.
void Ogre::Technique::setSceneBlending | ( | const SceneBlendFactor | sourceFactor, |
const SceneBlendFactor | destFactor | ||
) |
Allows very fine control of blending every Pass with the existing contents of the scene.
void Ogre::Technique::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, using individual factors both color and alpha channels.
void Ogre::Technique::setLodIndex | ( | unsigned short | index | ) |
Assigns a level-of-detail (LOD) index to this Technique.
|
inline |
Gets the level-of-detail index assigned to this Technique.
void Ogre::Technique::setSchemeName | ( | const String & | schemeName | ) |
Set the 'scheme name' for this technique.
const String& Ogre::Technique::getSchemeName | ( | void | ) | const |
Returns the scheme to which this technique is assigned.
unsigned short Ogre::Technique::_getSchemeIndex | ( | void | ) | const |
Internal method for getting the scheme index.
bool Ogre::Technique::isDepthWriteEnabled | ( | void | ) | const |
Is depth writing going to occur on this technique?
bool Ogre::Technique::isDepthCheckEnabled | ( | void | ) | const |
Is depth checking going to occur on this technique?
bool Ogre::Technique::hasColourWriteDisabled | ( | void | ) | const |
Exists colour writing disabled pass on this technique?
void Ogre::Technique::setName | ( | const String & | name | ) |
Set the name of the technique.
|
inline |
Gets the name of the technique.
bool Ogre::Technique::applyTextureAliases | ( | const AliasTextureNamePairList & | aliasList, |
const bool | apply = true |
||
) | const |
Applies texture names to Texture Unit State with matching texture name aliases.
All passes, and Texture Unit States within the technique are checked. If matching texture aliases are found then true is returned.
aliasList | is a map container of texture alias, texture name pairs |
apply | set true to apply the texture aliases else just test to see if texture alias matches are found. |
void Ogre::Technique::addGPUVendorRule | ( | GPUVendor | vendor, |
IncludeOrExclude | includeOrExclude | ||
) |
Add a rule which manually influences the support for this technique based on a GPU vendor.
vendor | The GPU vendor |
includeOrExclude | Whether this is an inclusive or exclusive rule |
void Ogre::Technique::addGPUVendorRule | ( | const GPUVendorRule & | rule | ) |
Add a rule which manually influences the support for this technique based on a GPU vendor.
void Ogre::Technique::removeGPUVendorRule | ( | GPUVendor | vendor | ) |
Removes a matching vendor rule.
GPUVendorRuleIterator Ogre::Technique::getGPUVendorRuleIterator | ( | ) | const |
Get an iterator over the currently registered vendor rules.
|
inline |
Get the currently registered vendor rules.
void Ogre::Technique::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 GPU device name (e.g.
'8800').
devicePattern | The GPU vendor |
includeOrExclude | Whether this is an inclusive or exclusive rule |
caseSensitive | Whether the match is case sensitive or not |
void Ogre::Technique::addGPUDeviceNameRule | ( | const GPUDeviceNameRule & | rule | ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
void Ogre::Technique::removeGPUDeviceNameRule | ( | const String & | devicePattern | ) |
Removes a matching device name rule.
GPUDeviceNameRuleIterator Ogre::Technique::getGPUDeviceNameRuleIterator | ( | ) | const |
Get an iterator over the currently registered device name rules.
|
inline |
Get the currently registered device name rules.
|
inline |
Return an instance of user objects binding associated with this class.
You can use it to associate one or more custom objects with this class instance.
|
inline |
Return an instance of user objects binding associated with this class.
You can use it to associate one or more custom objects with this class instance.