Expose global light through DeferredLighting singleton

This commit is contained in:
Zach Pomerantz 2016-01-13 17:52:02 -08:00
parent e471dcc90e
commit 70cc7d87e4
2 changed files with 6 additions and 1 deletions

View file

@ -541,6 +541,10 @@ void DeferredLightingEffect::setGlobalLight(const glm::vec3& direction, const gl
light->setAmbientIntensity(ambientIntensity);
}
model::LightPointer DeferredLightingEffect::getGlobalLight() {
return _allocatedLights[_globalLights.front()];
}
void DeferredLightingEffect::setGlobalSkybox(const model::SkyboxPointer& skybox) {
_skybox = skybox;
}

View file

@ -48,9 +48,10 @@ public:
void setAmbientLightMode(int preset);
void setGlobalLight(const glm::vec3& direction, const glm::vec3& diffuse, float intensity, float ambientIntensity);
void setGlobalAtmosphere(const model::AtmospherePointer& atmosphere) { _atmosphere = atmosphere; }
void setGlobalSkybox(const model::SkyboxPointer& skybox);
model::LightPointer getGlobalLight();
private:
DeferredLightingEffect() = default;