StevEngine
StevEngine is a customizable C++ game engine.
|
Base class for light components. More...
#include <visuals/Lights.hpp>
Public Member Functions | |
virtual void | UpdateShader (const Renderer::ShaderProgram &program) const =0 |
Update shader uniforms for this light. | |
virtual void | ResetShader (const Renderer::ShaderProgram &program) const =0 |
Reset shader uniforms for this light. | |
uint32_t | GetShaderLightID () const |
Get shader light ID. | |
![]() | |
Component () | |
Create new component. | |
virtual | ~Component () |
Clean up component resources. | |
GameObject & | GetParent () const |
Get parent GameObject. | |
Scene & | GetScene () const |
Get containing Scene. | |
virtual std::string | GetType () const =0 |
Get component type. | |
virtual Utilities::Stream | Export (Utilities::StreamType stream) const =0 |
Serialize component to a stream. | |
virtual void | Start () |
Initialize component after creation. | |
Public Attributes | |
Utilities::Vector3 | diffuse |
Diffuse light color. | |
Utilities::Vector3 | specular |
Specular light color. | |
Protected Member Functions | |
Light (uint32_t shaderID, Utilities::Vector3 diffuse, Utilities::Vector3 specular, std::string type) | |
Light (Utilities::Stream &stream, std::string type) | |
Protected Attributes | |
const uint32_t | shaderLightID |
Light index in shader. | |
![]() | |
std::vector< std::pair< Utilities::ID, std::string > > | handlers |
Event handler registrations. | |
Base class for light components.
Provides common functionality for different types of lights. Handles shader updates and light properties.
|
inline |
Get shader light ID.
|
pure virtual |
Reset shader uniforms for this light.
program | Shader program to reset |
Implemented in StevEngine::Visuals::DirectionalLight, StevEngine::Visuals::PointLight, and StevEngine::Visuals::SpotLight.
|
pure virtual |
Update shader uniforms for this light.
program | Shader program to update |
Implemented in StevEngine::Visuals::DirectionalLight, StevEngine::Visuals::PointLight, and StevEngine::Visuals::SpotLight.