|
Khaotic Engine Reborn
|
Public Member Functions | |
| ShaderComponent () | |
| void | Initialize () override |
| void | Update (float deltaTime) override |
| ShaderType | GetActiveShader () const |
| void | SetActiveShader (ShaderType shader) |
Public Member Functions inherited from ecs::Component | |
| Component (const Component &)=delete | |
| Component & | operator= (const Component &)=delete |
| Component (Component &&)=default | |
| Component & | operator= (Component &&)=default |
Static Public Member Functions | |
| static ShaderType | StringToShaderType (const std::string &str) |
| static std::string | ShaderTypeToString (ShaderType type) |
Definition at line 24 of file shader_component.h.
|
inline |
Builder for the ShaderComponent class. Initializes the active shader to LIGHTING by default.
Definition at line 31 of file shader_component.h.
|
inline |
Get the currently active shader type.
Definition at line 41 of file shader_component.h.
|
inlineoverridevirtual |
Virtual function to initialize the component.
Reimplemented from ecs::Component.
Definition at line 34 of file shader_component.h.
|
inline |
Set the active shader type. This method allows changing the shader type used for rendering.
| shader | The shader type to set as a ShaderType enum. |
Definition at line 47 of file shader_component.h.
|
inlinestatic |
Convert a ShaderType enum to its string representation. This method provides a string name for each shader type.
| type | The shader type as a ShaderType enum. |
Definition at line 75 of file shader_component.h.
|
inlinestatic |
Set the active shader type from a string. This method converts a string representation of a shader type to the corresponding ShaderType enum.
| shaderName | The name of the shader type as a string. |
Definition at line 55 of file shader_component.h.
|
inlineoverridevirtual |
Virtual function to update the component.
| deltaTime | Time since the last update. |
Reimplemented from ecs::Component.
Definition at line 35 of file shader_component.h.