#include <SceneLighting.h>
Definition at line 17 of file SceneLighting.h.
◆ SceneLighting() [1/3]
| Elevate::SceneLighting::SceneLighting |
( |
| ) |
|
|
default |
◆ SceneLighting() [2/3]
Definition at line 21 of file SceneLighting.h.
22 : m_dirLight(dirLight), m_pointLights(pointLights) { }
◆ SceneLighting() [3/3]
Definition at line 23 of file SceneLighting.h.
24 : m_dirLight(dirLight), m_pointLights(pointLights) {}
◆ UploadToShader()
| void Elevate::SceneLighting::UploadToShader |
( |
const std::shared_ptr< Shader > & |
shader | ) |
const |
Definition at line 11 of file SceneLighting.cpp.
12 {
13 if (shader)
14 {
16
17 if (m_dirLight)
18 {
19 shader->UseDirLight(m_dirLight);
20 }
21
22 size_t pointLightsCount = m_pointLights.size();
23 shader->SetUniform1i("u_NumPointLights", (int)pointLightsCount);
24 for (size_t i = 0; i < pointLightsCount; i++)
25 {
26 m_pointLights[i]->UploadToShader(shader.get(), (uint32_t)i);
27 }
28 }
29 }
static bool BindShader(const std::shared_ptr< Shader > &shader)
The documentation for this class was generated from the following files: