Predefined key class for sf::Shader resources.
More...
List of all members.
Static Public Member Functions |
| static ShaderKey | FromFile (const std::string &fileName, sf::Shader::Type shaderType, const std::string &tag="") |
| | Load sf::Shader from file name.
|
| static ShaderKey | FromFile (const std::string &vertexShaderFilename, const std::string &fragmentShaderFilename, const std::string &tag="") |
| | Load sf::Shader from two file names.
|
| static ShaderKey | FromMemory (const std::string &shaderCode, sf::Shader::Type shaderType, const std::string &tag="") |
| | Load sf::Shader from source code in memory.
|
| static ShaderKey | FromMemory (const std::string &vertexShaderCode, const std::string &fragmentShaderCode, const std::string &tag="") |
| | Load sf::Shader from two source codes in memory.
|
| static ShaderKey | FromStream (sf::InputStream &stream, sf::Shader::Type shaderType, const std::string &tag="") |
| | Load sf::Shader from input stream.
|
| static ShaderKey | FromStream (sf::InputStream &vertexShaderStream, sf::InputStream &fragmentShaderStream, const std::string &tag="") |
| | Load sf::Shader from two input streams.
|
Public Member Functions |
| MovedPtr< sf::Shader, NoCopy > | 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.
|
Detailed Description
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.
Member Function Documentation
Load sf::Shader from file name.
- Parameters:
-
| fileName | The name of the file from which you want to load the sf::Shader. |
| shaderType | Type of shader (vertex or fragment) |
| tag | If an existing key has the same loading parameters, you can use this ID to create a distinct key. |
- See also:
- sf::Shader::LoadFromFile()
Load sf::Shader from two file names.
- Parameters:
-
| vertexShaderFilename | The name of the file from which you want to load the vertex shader. |
| fragmentShaderFilename | The name of the file from which you want to load the fragment shader. |
| tag | If an existing key has the same loading parameters, you can use this ID to create a distinct key. |
- See also:
- sf::Shader::LoadFromFile()
Load sf::Shader from source code in memory.
- Parameters:
-
| shaderCode | String containing the source code of the shader. |
| shaderType | Type of shader (vertex or fragment) |
| tag | If an existing key has the same loading parameters, you can use this ID to create a distinct key. |
- See also:
- sf::Shader::LoadFromMemory()
Load sf::Shader from two source codes in memory.
- Parameters:
-
| vertexShaderCode | String containing the source code of the vertex shader. |
| fragmentShaderCode | String containing the source code of the fragment shader. |
| tag | If an existing key has the same loading parameters, you can use this ID to create a distinct key. |
- See also:
- sf::Shader::LoadFromMemory()
Load sf::Shader from input stream.
- Parameters:
-
| stream | Source stream to read from. |
| shaderType | Type of shader (vertex or fragment) |
| tag | If an existing key has the same loading parameters, you can use this ID to create a distinct key. |
- See also:
- sf::Shader::LoadFromStream()
Load sf::Shader from two input streams.
- Parameters:
-
| vertexShaderStream | Source stream to read the vertex shader from. |
| fragmentShaderStream | Source stream to read the fragment shader from. |
| tag | If an existing key has the same loading parameters, you can use this ID to create a distinct key. |
- See also:
- sf::Shader::LoadFromStream()
Loads the shader as specified by the static functions.
- Returns:
- Movable smart pointer to the allocated sf::Shader, or null pointer at loading failure.
The documentation for this class was generated from the following file: