304 void compile(
bool autoManageTextureUnits =
true);
522 Real expDensity = 0.001,
Real linearStart = 0.0,
Real linearEnd = 1.0 );
651 if (mCompilationRequired)
675 return mCompilationRequired;
Class representing colour.
static const ColourValue White
Concrete IteratorWrapper for const access to the underlying container.
Strategy for determining level of detail.
Interface describing a manual resource loader.
Class for managing Material settings for Ogre.
Class encapsulates rendering properties of an object.
void setShininess(Real val)
Sets the shininess properties of every Pass in every Technique.
bool isTransparent(void) const
Determines if the material has any transparency with the rest of the scene (derived from whether any ...
ConstVectorIterator< LodValueList > LodValueIterator
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...
bool getCompilationRequired() const
Gets the compilation status of the material.
map< unsigned short, LodTechniques * >::type BestTechniquesBySchemeList
const LodStrategy * mLodStrategy
void setSelfIllumination(Real red, Real green, Real blue)
Sets the amount of self-illumination of every Pass in every Technique.
void unloadImpl(void)
Unloads the material, frees resources etc.
void removeAllTechniques(void)
Removes all the techniques in this Material.
void setSceneBlending(const SceneBlendFactor sourceFactor, const SceneBlendFactor destFactor)
Allows very fine control of blending every Pass with the existing contents of the scene.
MaterialPtr clone(const String &newName, bool changeGroup=false, const String &newGroup=StringUtil::BLANK) const
Creates a new copy of this material with the same settings but a new name.
void setSpecular(Real red, Real green, Real blue, Real alpha)
Sets the specular colour reflectance properties of every Pass in every Technique.
void compile(bool autoManageTextureUnits=true)
'Compiles' this Material.
const String & getUnsupportedTechniquesExplanation() const
Gets a string explaining why any techniques are not supported.
void setTextureFiltering(TextureFilterOptions filterType)
Set texture filtering for every texture unit in every Technique and Pass.
LodValueList mUserLodValues
void copyDetailsTo(MaterialPtr &mat) const
Copies the details of this material into another, preserving the target's handle and name (unlike ope...
map< unsigned short, Technique * >::type LodTechniques
void setSelfIllumination(const ColourValue &selfIllum)
Sets the amount of self-illumination of every Pass in every Technique.
TechniqueIterator getTechniqueIterator(void)
Get an iterator over the Techniques in this Material.
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.
unsigned short getNumLodLevels(unsigned short schemeIndex) const
Gets the number of levels-of-detail this material has in the given scheme, based on Technique::setLod...
void touch(void)
'Touches' the resource to indicate it has been used.
Technique * getBestTechnique(unsigned short lodIndex=0, const Renderable *rend=0)
Gets the best supported technique.
bool applyTextureAliases(const AliasTextureNamePairList &aliasList, const bool apply=true) const
Applies texture names to Texture Unit State with matching texture name aliases.
void unprepareImpl(void)
Overridden from Resource.
void setDepthCheckEnabled(bool enabled)
Sets whether or not each Pass renders with depth-buffer checking on or not.
Technique * getTechnique(const String &name)
searches for the named technique.
VectorIterator< Techniques > TechniqueIterator
vector< Real >::type LodValueList
distance list used to specify LOD
void setAmbient(Real red, Real green, Real blue)
Sets the ambient colour reflectance properties for every Pass in every Technique.
void setTransparencyCastsShadows(bool enabled)
Sets whether objects using this material be classified as opaque to the shadow caster system.
void loadImpl(void)
Overridden from Resource.
void setDepthFunction(CompareFunction func)
Sets the function used to compare depth values when depth checking is on.
void _notifyNeedsRecompile(void)
Tells the material that it needs recompilation.
void setLodLevels(const LodValueList &lodValues)
Sets the distance at which level-of-detail (LOD) levels come into effect.
unsigned short getNumTechniques(void) const
Retrieves the number of techniques.
Techniques mSupportedTechniques
Supported techniques of any sort.
size_t calculateSize(void) const
Calculate the size of a resource; this will only be called after 'load'.
void setLightingEnabled(bool enabled)
Sets whether or not dynamic lighting is enabled for every Pass.
bool getReceiveShadows(void) const
Returns whether or not objects using this material will receive shadows.
void insertSupportedTechnique(Technique *t)
Insert a supported technique into the local collections.
void setLodStrategy(LodStrategy *lodStrategy)
Set the LOD strategy used by this material.
void setCullingMode(CullingMode mode)
Sets the culling mode for each pass based on the 'vertex winding'.
void removeTechnique(unsigned short index)
Removes the technique at the given index.
void setPointSize(Real ps)
Sets the point size properties for every Pass in every Technique.
void setSceneBlending(const SceneBlendType sbt)
Sets the kind of blending every pass has with the existing contents of the scene.
unsigned short getNumLodLevels(const String &schemeName) const
Gets the number of levels-of-detail this material has in the given scheme, based on Technique::setLod...
TechniqueIterator getSupportedTechniqueIterator(void)
Gets an iterator over all the Techniques which are supported by the current card.
String mUnsupportedReasons
Text description of why any techniques are not supported.
bool mCompilationRequired
Does this material require compilation?
void applyDefaults(void)
Internal method which sets the material up from the default settings.
void setTextureAnisotropy(int maxAniso)
Sets the anisotropy level to be used for all textures.
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,...
LodValueIterator getUserLodValueIterator(void) const
Gets an iterator over the user-defined list of values which are internally transfomed by the LodStrat...
bool getTransparencyCastsShadows(void) const
Returns whether or not objects using this material be classified as opaque to the shadow caster syste...
void setColourWriteEnabled(bool enabled)
Sets whether or not colour buffer writing is enabled for each Pass.
Technique * getTechnique(unsigned short index)
Gets the indexed technique.
void setDepthWriteEnabled(bool enabled)
Sets whether or not each Pass renders with depth-buffer writing on or not.
void setReceiveShadows(bool enabled)
Sets whether objects using this material will receive shadows.
void setShadingMode(ShadeOptions mode)
Sets the type of light shading required.
BestTechniquesBySchemeList mBestTechniquesBySchemeList
Map of scheme -> list of LOD techniques.
void setDiffuse(const ColourValue &diffuse)
Sets the diffuse colour reflectance properties of every Pass in every Technique.
void setSpecular(const ColourValue &specular)
Sets the specular colour reflectance properties of every Pass in every Technique.
void clearBestTechniqueList(void)
Clear the best technique list.
void prepareImpl(void)
Overridden from Resource.
void setDepthBias(float constantBias, float slopeScaleBias)
Sets the depth bias to be used for each Pass.
const LodStrategy * getLodStrategy() const
Get LOD strategy used by this material.
Technique * getSupportedTechnique(unsigned short index)
Gets the indexed supported technique.
void setManualCullingMode(ManualCullingMode mode)
Sets the manual culling mode, performed by CPU rather than hardware.
Material & operator=(const Material &rhs)
Assignment operator to allow easy copying between materials.
unsigned short getNumSupportedTechniques(void) const
Retrieves the number of supported techniques.
Techniques mTechniques
All techniques, supported and unsupported.
Material(ResourceManager *creator, const String &name, ResourceHandle handle, const String &group, bool isManual=false, ManualResourceLoader *loader=0)
Constructor - use resource manager's create method rather than this.
void setDiffuse(Real red, Real green, Real blue, Real alpha)
Sets the diffuse colour reflectance properties of every Pass in every Technique.
bool mTransparencyCastsShadows
void setAmbient(const ColourValue &ambient)
Sets the ambient colour reflectance properties for every Pass in every Technique.
Technique * createTechnique(void)
Creates a new Technique for this Material.
ushort getLodIndex(Real value) const
Gets the LOD index to use at the given value.
LodValueIterator getLodValueIterator(void) const
Gets an iterator over the list of values transformed by the LodStrategy at which each LOD comes into ...
vector< Technique * >::type Techniques
Abstract class defining the interface all renderable objects must implement.
Defines a generic resource handler.
Abstract class representing a loadable resource (e.g.
virtual void touch(void)
'Touches' the resource to indicate it has been used.
Manages the organisation and rendering of a 'scene' i.e.
static const String BLANK
Constant blank string, useful for returning by ref where local does not exist.
Class representing an approach to rendering this particular Material.
Concrete IteratorWrapper for nonconst access to the underlying container.
CompareFunction
Comparison functions used for the depth/stencil buffer operations and others.
ManualCullingMode
Manual culling modes based on vertex normals.
map< String, String >::type AliasTextureNamePairList
Alias / Texture name pair (first = alias, second = texture name)
TextureFilterOptions
High-level filtering options providing shortcuts to settings the minification, magnification and mip ...
ShadeOptions
Light shading modes.
CullingMode
Hardware culling modes based on vertex winding.
SceneBlendFactor
Blending factors for manually blending objects with the scene.
SceneBlendType
Types of blending that you can specify between an object and the existing contents of the scene.
float Real
Software floating point type.
unsigned long long int ResourceHandle
std::map< K, V, P, A > type