mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-25 17:14:59 +02:00
Avoid light prop copies when setting globalLight
This commit is contained in:
parent
1817b8ef2f
commit
20bfdba14b
1 changed files with 1 additions and 7 deletions
|
@ -560,13 +560,7 @@ static void loadLightProgram(const char* vertSource, const char* fragSource, boo
|
|||
}
|
||||
|
||||
void DeferredLightingEffect::setGlobalLight(const model::LightPointer& light, const gpu::TexturePointer& skyboxTexture) {
|
||||
auto globalLight = _allocatedLights.front();
|
||||
globalLight->setDirection(light->getDirection());
|
||||
globalLight->setColor(light->getColor());
|
||||
globalLight->setIntensity(light->getIntensity());
|
||||
globalLight->setAmbientIntensity(light->getAmbientIntensity());
|
||||
globalLight->setAmbientSphere(light->getAmbientSphere());
|
||||
|
||||
_allocatedLights.front() = light;
|
||||
_skyboxTexture = skyboxTexture;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue