shiny  0.4
a shader and material management library for OGRE
All Classes Namespaces Files Functions Variables Typedefs Enumerations Friends Modules Pages
Public Member Functions | Friends | List of all members
sh::ShaderSet Class Reference

Contains possible shader permutations of a single uber-shader (represented by one source file) More...

#include <ShaderSet.hpp>

Public Member Functions

 ShaderSet (const std::string &type, const std::string &cgProfile, const std::string &hlslProfile, const std::string &sourceFile, const std::string &basePath, const std::string &name, PropertySetGet *globalSettingsPtr)
 
ShaderInstancegetInstance (PropertySetGet *properties)
 

Friends

class ShaderInstance
 

Detailed Description

Contains possible shader permutations of a single uber-shader (represented by one source file)

Member Function Documentation

◆ getInstance()

ShaderInstance* sh::ShaderSet::getInstance ( PropertySetGet properties)

Retrieve a shader instance for the given properties.
If a ShaderInstance with the same properties exists already, simply returns this instance.
Otherwise, creates a new ShaderInstance (i.e. compiles a new shader).
Might also return NULL if the shader failed to compile.

Note
Only the properties that actually affect the shader source are taken into consideration here, so it does not matter if you pass any extra properties that the shader does not care about.

The documentation for this class was generated from the following file: