mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 03:44:02 +02:00
Expose global light through DeferredLighting singleton
This commit is contained in:
parent
e471dcc90e
commit
70cc7d87e4
2 changed files with 6 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in a new issue