mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 17:17:58 +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);
|
light->setAmbientIntensity(ambientIntensity);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
model::LightPointer DeferredLightingEffect::getGlobalLight() {
|
||||||
|
return _allocatedLights[_globalLights.front()];
|
||||||
|
}
|
||||||
|
|
||||||
void DeferredLightingEffect::setGlobalSkybox(const model::SkyboxPointer& skybox) {
|
void DeferredLightingEffect::setGlobalSkybox(const model::SkyboxPointer& skybox) {
|
||||||
_skybox = skybox;
|
_skybox = skybox;
|
||||||
}
|
}
|
||||||
|
|
|
@ -48,9 +48,10 @@ public:
|
||||||
void setAmbientLightMode(int preset);
|
void setAmbientLightMode(int preset);
|
||||||
void setGlobalLight(const glm::vec3& direction, const glm::vec3& diffuse, float intensity, float ambientIntensity);
|
void setGlobalLight(const glm::vec3& direction, const glm::vec3& diffuse, float intensity, float ambientIntensity);
|
||||||
void setGlobalAtmosphere(const model::AtmospherePointer& atmosphere) { _atmosphere = atmosphere; }
|
void setGlobalAtmosphere(const model::AtmospherePointer& atmosphere) { _atmosphere = atmosphere; }
|
||||||
|
|
||||||
void setGlobalSkybox(const model::SkyboxPointer& skybox);
|
void setGlobalSkybox(const model::SkyboxPointer& skybox);
|
||||||
|
|
||||||
|
model::LightPointer getGlobalLight();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
DeferredLightingEffect() = default;
|
DeferredLightingEffect() = default;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue