|
Muto 0.0.1
|
A library for managing and storing shaders. More...
#include <Shader.h>
Public Member Functions | |
| void | Add (const Ref< Shader > &shader) |
| Adds a shader to the library using its own name. | |
| void | Add (const std::string &name, const Ref< Shader > &shader) |
| Adds a shader to the library with the specified name. | |
| bool | Exists (const std::string &name) const |
| Checks if a shader with the specified name exists in the library. | |
| Ref< Shader > | Get (const std::string &name) |
| Retrieves a shader from the library by name. | |
| Ref< Shader > | Load (const std::string &filepath) |
| Loads a shader from the specified filepath and adds it to the library. | |
| Ref< Shader > | Load (const std::string &name, const std::string &filepath) |
| Loads a shader from the specified filepath and adds it to the library with the given name. | |
Private Attributes | |
| std::unordered_map< std::string, Ref< Shader > > | m_Shaders |
A library for managing and storing shaders.
Adds a shader to the library using its own name.
Adds a shader to the library with the specified name.
Checks if a shader with the specified name exists in the library.
| Muto::Ref< Muto::Shader > Muto::ShaderLibrary::Get | ( | const std::string & | name | ) |
Retrieves a shader from the library by name.
| Muto::Ref< Muto::Shader > Muto::ShaderLibrary::Load | ( | const std::string & | filepath | ) |
Loads a shader from the specified filepath and adds it to the library.
| Muto::Ref< Muto::Shader > Muto::ShaderLibrary::Load | ( | const std::string & | name, |
| const std::string & | filepath | ||
| ) |
Loads a shader from the specified filepath and adds it to the library with the given name.