shiny  0.4
a shader and material management library for OGRE
Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
sh::Platform Class Referenceabstract
+ Inheritance diagram for sh::Platform:

Public Member Functions

 Platform (const std::string &basePath)
 
void setCacheFolder (const std::string &folder)
 set the folder to use for shader caching
 

Protected Member Functions

virtual bool supportsShaderSerialization ()
 
virtual bool supportsMaterialQueuedListener ()
 
MaterialInstancefireMaterialRequested (const std::string &name, const std::string &configuration, unsigned short lodIndex)
 

Protected Attributes

std::string mCacheFolder
 
FactorymFactory
 

Friends

class Factory
 
class MaterialInstance
 
class ShaderInstance
 
class ShaderSet
 

Member Function Documentation

◆ fireMaterialRequested()

MaterialInstance* sh::Platform::fireMaterialRequested ( const std::string &  name,
const std::string &  configuration,
unsigned short  lodIndex 
)
protected

fire event: material requested for rendering

Parameters
namematerial name
configurationrequested configuration

◆ supportsMaterialQueuedListener()

virtual bool sh::Platform::supportsMaterialQueuedListener ( )
protectedvirtual

this will be true if the platform supports a listener that notifies the system whenever a material is requested for rendering. if this is supported, shaders can be compiled on-demand when needed (and not earlier)

Todo:
the Factory is not designed yet to handle the case where this method returns false

Reimplemented in sh::OgrePlatform.

◆ supportsShaderSerialization()

virtual bool sh::Platform::supportsShaderSerialization ( )
protectedvirtual

this will be true if the platform supports serialization (writing shader microcode to disk) and deserialization (create gpu program from saved microcode)

Reimplemented in sh::OgrePlatform.


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