28#ifndef __MATERIALMANAGER_H__
29#define __MATERIALMANAGER_H__
105 const String& schemeName,
Material* originalMaterial,
unsigned short lodIndex,
Interface describing a manual resource loader.
Listener on any general material events.
virtual bool afterIlluminationPassesCreated(Technique *technique)
Called right after illuminated passes were created, so that owner of runtime generated technique can ...
virtual ~Listener()
Virtual destructor needed as class has virtual methods.
virtual bool beforeIlluminationPassesCleared(Technique *technique)
Called right before illuminated passes would be removed, so that owner of runtime generated technique...
virtual Technique * handleSchemeNotFound(unsigned short schemeIndex, const String &schemeName, Material *originalMaterial, unsigned short lodIndex, const Renderable *rend)=0
Called if a technique for a given scheme is not found within a material, allows the application to sp...
String mActiveSchemeName
Current material scheme.
virtual unsigned short _getActiveSchemeIndex(void) const
Internal method - returns the active scheme index.
void setDefaultAnisotropy(unsigned int maxAniso)
Sets the default anisotropy level to be used for loaded textures, for when textures are loaded automa...
map< String, ListenerList >::type ListenerMap
static String DEFAULT_SCHEME_NAME
Default material scheme.
MaterialPtr create(const String &name, const String &group, bool isManual=false, ManualResourceLoader *loader=0, const NameValuePairList *createParams=0)
Create a new material.
FilterOptions mDefaultMipFilter
Default Texture filtering - mipmapping.
bool mDefaultCompareEnabled
void initialise(void)
Initialises the material manager, which also triggers it to parse all available .program and ....
virtual const String & getActiveScheme(void) const
Returns the name of the active material scheme.
FilterOptions mDefaultMagFilter
Default Texture filtering - magnification.
virtual const String & _getSchemeName(unsigned short index)
Internal method - returns name for a given material scheme index.
virtual void removeListener(Listener *l, const Ogre::String &schemeName=StringUtil::BLANK)
Remove a listener handling material events.
static MaterialManager * getSingletonPtr(void)
Override standard Singleton retrieval.
unsigned short mActiveSchemeIndex
Current material scheme.
CompareFunction mDefaultCompareFunction
virtual void setDefaultTextureFiltering(FilterType ftype, FilterOptions opts)
Sets the default texture filtering to be used for loaded textures, for when textures are loaded autom...
map< String, unsignedshort >::type SchemeMap
Scheme name -> index. Never shrinks! Should be pretty static anyway.
void parseScript(DataStreamPtr &stream, const String &groupName)
virtual Technique * _arbitrateMissingTechniqueForActiveScheme(Material *mat, unsigned short lodIndex, const Renderable *rend)
Internal method for sorting out missing technique for a scheme.
virtual void _notifyBeforeIlluminationPassesCleared(Technique *mat)
Internal method for sorting out illumination passes for a scheme.
MaterialPtr getByName(const String &name, const String &groupName=ResourceGroupManager::AUTODETECT_RESOURCE_GROUP_NAME)
Get a resource by name.
virtual void setActiveScheme(const String &schemeName)
Sets the name of the active material scheme.
virtual void setDefaultTextureFiltering(TextureFilterOptions fo)
Sets the default texture filtering to be used for loaded textures, for when textures are loaded autom...
unsigned int getDefaultAnisotropy() const
Get the default maxAnisotropy.
SchemeMap mSchemes
List of material schemes.
virtual ~MaterialManager()
Default destructor.
virtual void _notifyAfterIlluminationPassesCreated(Technique *mat)
Internal method for sorting out illumination passes for a scheme.
MaterialPtr mDefaultSettings
Default settings.
virtual MaterialPtr getDefaultSettings(void) const
Returns a pointer to the default Material settings.
virtual void addListener(Listener *l, const Ogre::String &schemeName=StringUtil::BLANK)
Add a listener to handle material events.
list< Listener * >::type ListenerList
The list of per-scheme (and general) material listeners.
OGRE_THREAD_POINTER(MaterialSerializer, mSerializer)
Serializer - Hold instance per thread if necessary.
FilterOptions mDefaultMinFilter
Default Texture filtering - minification.
virtual void setDefaultTextureFiltering(FilterOptions minFilter, FilterOptions magFilter, FilterOptions mipFilter)
Sets the default texture filtering to be used for loaded textures, for when textures are loaded autom...
unsigned int mDefaultMaxAniso
Default Texture anisotropy.
static MaterialManager & getSingleton(void)
Override standard Singleton retrieval.
virtual unsigned short _getSchemeIndex(const String &name)
Internal method - returns index for a given material scheme name.
MaterialManager()
Default constructor.
virtual FilterOptions getDefaultTextureFiltering(FilterType ftype) const
Get the default texture filtering.
Resource * createImpl(const String &name, ResourceHandle handle, const String &group, bool isManual, ManualResourceLoader *loader, const NameValuePairList *params)
Overridden from ResourceManager.
FilterOptions mDefaultCompare
Default Texture filtering - comparison.
Class for serializing Materials to / from a .material script.
Class encapsulates rendering properties of an object.
Abstract class defining the interface all renderable objects must implement.
static String AUTODETECT_RESOURCE_GROUP_NAME
Special resource group name which causes resource group to be automatically determined based on searc...
Abstract class representing a loadable resource (e.g.
Singleton(const Singleton< MaterialManager > &)
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.
CompareFunction
Comparison functions used for the depth/stencil buffer operations and others.
FilterOptions
Filtering options for textures / mipmaps.
map< String, String >::type NameValuePairList
Name / value parameter pair (first = name, second = value)
TextureFilterOptions
High-level filtering options providing shortcuts to settings the minification, magnification and mip ...
SharedPtr< DataStream > DataStreamPtr
Shared pointer to allow data streams to be passed around without worrying about deallocation.
SharedPtr< Material > MaterialPtr
unsigned long long int ResourceHandle
std::map< K, V, P, A > type