Base class for lights.
More...
#include <Light.h>
|
virtual void | setUniforms (const std::vector< std::shared_ptr< Shader >> &shaders, int index) final |
|
◆ setUniform()
void Light::setUniform |
( |
std::shared_ptr< Shader > & |
shader, |
|
|
int |
index |
|
) |
| |
|
protectedvirtual |
Uniforms to update for a particular light and shader. Has to be overwritten.
- Parameters
-
shader | shader to be updated. |
index | index index of the light among lights of the same type (used in shader to index light) |
Reimplemented in SpotLight, DirectionalLight, and PointLight.
◆ setUniforms()
void Light::setUniforms |
( |
const std::vector< std::shared_ptr< Shader >> & |
shaders, |
|
|
int |
index |
|
) |
| |
|
finalvirtual |
Updates all light related uniform for all shaders in shaders-vector for this light. Internally calls void setUniform(std::shared_ptr<Shader>& shadeer, int index);
- Parameters
-
shaders | Vectors of all shaders to be uodated. |
index | index of the light among lights of the same type (used in shader to index light) |
The documentation for this class was generated from the following files: