shiny
0.4
a shader and material management library for OGRE
|
A specific material instance, which has all required properties set (for example the diffuse & normal map, ambient/diffuse/specular values).
Depending on these properties, the system will automatically select a shader permutation that suits these and create the backend materials / passes (provided by the Platform class).
More...
#include <MaterialInstance.hpp>
Public Member Functions | |
MaterialInstance (const std::string &name, Factory *f) | |
PassVector * | getParentPasses () |
gets the passes of the top-most parent | |
PassVector * | getPasses () |
get our passes (for derived materials, none) | |
MaterialInstancePass * | createPass () |
void | deletePass (unsigned int index) |
Material * | getMaterial () |
void | setListener (MaterialInstanceListener *l) |
attach a MaterialInstanceListener to this specific material (as opposed to MaterialListener, which listens to all materials) | |
std::string | getName () |
virtual void | setProperty (const std::string &name, PropertyValuePtr value) |
void | setSourceFile (const std::string &sourceFile) |
std::string | getSourceFile () |
get the name of the file this material was read from, or empty if it was created dynamically by code | |
Public Member Functions inherited from sh::PropertySetGet | |
PropertySetGet (PropertySetGet *parent) | |
void | save (std::ofstream &stream, const std::string &indentation) |
void | copyAll (PropertySet *target, PropertySetGet *context, bool copyParent=true) |
call setProperty for each property/value pair stored in this | |
void | copyAll (PropertySetGet *target, PropertySetGet *context, bool copyParent=true) |
call setProperty for each property/value pair stored in this | |
void | setParent (PropertySetGet *parent) |
PropertySetGet * | getParent () |
void | setContext (PropertySetGet *context) |
PropertySetGet * | getContext () |
PropertyValuePtr & | getProperty (const std::string &name) |
void | deleteProperty (const std::string &name) |
const PropertyMap & | listProperties () |
bool | hasProperty (const std::string &name) const |
Friends | |
class | Factory |
Additional Inherited Members | |
Protected Attributes inherited from sh::PropertySetGet | |
PropertySetGet * | mParent |
PropertySetGet * | mContext |
used to retrieve linked property values | |
A specific material instance, which has all required properties set (for example the diffuse & normal map, ambient/diffuse/specular values).
Depending on these properties, the system will automatically select a shader permutation that suits these and create the backend materials / passes (provided by the Platform class).
Material* sh::MaterialInstance::getMaterial | ( | ) |