Go to the documentation of this file.
28 #ifndef __MATERIALMANAGER_H__
29 #define __MATERIALMANAGER_H__
105 const String& schemeName,
Material* originalMaterial,
unsigned short lodIndex,
OGRE_THREAD_POINTER(MaterialSerializer, mSerializer)
Serializer - Hold instance per thread if necessary.
unsigned long long int ResourceHandle
virtual void addListener(Listener *l, const Ogre::String &schemeName=StringUtil::BLANK)
Add a listener to handle material events.
unsigned int mDefaultMaxAniso
Default Texture anisotropy.
unsigned int getDefaultAnisotropy() const
Get the default maxAnisotropy.
virtual void removeListener(Listener *l, const Ogre::String &schemeName=StringUtil::BLANK)
Remove a listener handling material events.
FilterOptions mDefaultCompare
Default Texture filtering - comparison.
map< String, ListenerList >::type ListenerMap
virtual void setActiveScheme(const String &schemeName)
Sets the name of the active material scheme.
MaterialPtr getByName(const String &name, const String &groupName=ResourceGroupManager::AUTODETECT_RESOURCE_GROUP_NAME)
Get a resource by name.
virtual MaterialPtr getDefaultSettings(void) const
Returns a pointer to the default Material settings.
list< Listener * >::type ListenerList
The list of per-scheme (and general) material listeners.
Class for managing Material settings for Ogre.
Listener on any general material events.
Class encapsulates rendering properties of an object.
virtual const String & _getSchemeName(unsigned short index)
Internal method - returns name for a given material scheme index.
static String AUTODETECT_RESOURCE_GROUP_NAME
Special resource group name which causes resource group to be automatically determined based on searc...
virtual Technique * _arbitrateMissingTechniqueForActiveScheme(Material *mat, unsigned short lodIndex, const Renderable *rend)
Internal method for sorting out missing technique for a scheme.
TextureFilterOptions
High-level filtering options providing shortcuts to settings the minification, magnification and mip ...
MaterialPtr create(const String &name, const String &group, bool isManual=false, ManualResourceLoader *loader=0, const NameValuePairList *createParams=0)
Create a new material.
CompareFunction mDefaultCompareFunction
static String DEFAULT_SCHEME_NAME
Default material scheme.
virtual ~Listener()
Virtual destructor needed as class has virtual methods.
Class representing an approach to rendering this particular Material.
map< String, String >::type NameValuePairList
Name / value parameter pair (first = name, second = value)
void setDefaultAnisotropy(unsigned int maxAniso)
Sets the default anisotropy level to be used for loaded textures, for when textures are loaded automa...
virtual void setDefaultTextureFiltering(TextureFilterOptions fo)
Sets the default texture filtering to be used for loaded textures, for when textures are loaded autom...
CompareFunction
Comparison functions used for the depth/stencil buffer operations and others.
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...
static const String BLANK
Constant blank string, useful for returning by ref where local does not exist.
map< String, unsigned short >::type SchemeMap
Scheme name -> index. Never shrinks! Should be pretty static anyway.
virtual unsigned short _getSchemeIndex(const String &name)
Internal method - returns index for a given material scheme name.
Resource * createImpl(const String &name, ResourceHandle handle, const String &group, bool isManual, ManualResourceLoader *loader, const NameValuePairList *params)
Overridden from ResourceManager.
Class for serializing Materials to / from a .material script.
Template class for creating single-instance global classes.
FilterOptions
Filtering options for textures / mipmaps.
Defines a generic resource handler.
MaterialPtr mDefaultSettings
Default settings.
FilterOptions mDefaultMagFilter
Default Texture filtering - magnification.
static MaterialManager & getSingleton(void)
Override standard Singleton retrieval.
virtual ~MaterialManager()
Default destructor.
Abstract class representing a loadable resource (e.g.
virtual const String & getActiveScheme(void) const
Returns the name of the active material scheme.
SchemeMap mSchemes
List of material schemes.
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...
void parseScript(DataStreamPtr &stream, const String &groupName)
String mActiveSchemeName
Current material scheme.
virtual unsigned short _getActiveSchemeIndex(void) const
Internal method - returns the active scheme index.
static MaterialManager * getSingletonPtr(void)
Override standard Singleton retrieval.
Abstract class defining the interface all renderable objects must implement.
unsigned short mActiveSchemeIndex
Current material scheme.
bool mDefaultCompareEnabled
FilterOptions mDefaultMinFilter
Default Texture filtering - minification.
Interface describing a manual resource loader.
MaterialManager()
Default constructor.
virtual FilterOptions getDefaultTextureFiltering(FilterType ftype) const
Get the default texture filtering.
void initialise(void)
Initialises the material manager, which also triggers it to parse all available .program and ....
virtual void setDefaultTextureFiltering(FilterType ftype, FilterOptions opts)
Sets the default texture filtering to be used for loaded textures, for when textures are loaded autom...
FilterOptions mDefaultMipFilter
Default Texture filtering - mipmapping.
Copyright © 2012 Torus Knot Software Ltd

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