Predefined key class for sf::Shader resources. More...
Static Public Member Functions | |
| static ShaderKey | FromFile (const std::string &fileName, const std::string &tag="") |
| Load sf::Shader from file name. | |
| static ShaderKey | FromMemory (const std::string &shaderCode, const std::string &tag="") |
| Load sf::Shader from source code in memory. | |
Public Member Functions | |
| MovedPtr< sf::Shader > | Load () const |
| Loads the shader as specified by the static functions. | |
| void | Swap (ShaderKey &other) |
| Exchanges the contents of *this with other. | |
Related Functions | |
| bool | thor::Resources::operator< (const ShaderKey &lhs, const ShaderKey &rhs) |
| Comparison operator for strict weak ordering. | |
| void | thor::Resources::swap (ShaderKey &lhs, ShaderKey &rhs) |
| Swaps two sf::Shader resource keys. | |
Predefined key class for sf::Shader resources.
You can use this class to specifiy the access and loading of sf::Shader resources in a ResourceManager.
| static ShaderKey thor::Resources::ShaderKey::FromFile | ( | const std::string & | fileName, |
| const std::string & | tag = "" |
||
| ) | [static] |
Load sf::Shader from file name.
| fileName | The name of the file from which you want to load the sf::Shader. |
| tag | If an existing key has the same loading parameters, you can use this ID to create a distinct key. |
| static ShaderKey thor::Resources::ShaderKey::FromMemory | ( | const std::string & | shaderCode, |
| const std::string & | tag = "" |
||
| ) | [static] |
Load sf::Shader from source code in memory.
| shaderCode | String containing the source code of the shader. |
| tag | If an existing key has the same loading parameters, you can use this ID to create a distinct key. |
| MovedPtr<sf::Shader> thor::Resources::ShaderKey::Load | ( | ) | const |
Loads the shader as specified by the static functions.