Urho3D
|
Shader definition parser. Constructs a list of shader variations from the definition. More...
#include <ShaderParser.h>
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< String > | globalDefines_ |
Global defines. | |
Vector< String > | globalDefineValues_ |
Global define values. | |
Vector< ShaderOption > | options_ |
Shader options. | |
HashMap< String, unsigned > | combinations_ |
Available combinations. |
Shader definition parser. Constructs a list of shader variations from the definition.