Urho3D
Public Member Functions | Private Member Functions | Private Attributes
Urho3D::ShaderParser Class Reference

Shader definition parser. Constructs a list of shader variations from the definition. More...

#include <ShaderParser.h>

List of all members.

Public Member Functions

bool Parse (ShaderType type, const XMLElement &element, const Vector< String > &globalDefines=Vector< String >(), const Vector< String > &globalDefineValues=Vector< String >())
 Parse from an XML element. Return true if successful.
String GetErrorMessage () const
 Return error message if parsing failed.
unsigned GetNumCombinations () const
 Return number of combinations.
const HashMap< String, unsigned > & GetAllCombinations () const
 Return all combinations.
bool HasCombination (const String &name) const
 Return whether a shader combination exists.
ShaderCombination GetCombination (const String &name) const
 Return a combination by name.

Private Member Functions

bool ParseOptions (const XMLElement &element)
 Parse options for a shader.
void BuildCombinations ()
 Construct shader combinations from the options.

Private Attributes

String errorMessage_
 Error message.
Vector< StringglobalDefines_
 Global defines.
Vector< StringglobalDefineValues_
 Global define values.
Vector< ShaderOptionoptions_
 Shader options.
HashMap< String, unsigned > combinations_
 Available combinations.

Detailed Description

Shader definition parser. Constructs a list of shader variations from the definition.


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