Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/intern
diff options
context:
space:
mode:
authorThomas Dinges <blender@dingto.org>2015-05-14 02:11:43 +0300
committerThomas Dinges <blender@dingto.org>2015-05-14 02:13:40 +0300
commit0e80eb82e0667aa9b64d5a5e3e34c84d1d9957a3 (patch)
tree3cb65d769436959d6e688de9048b9ec7c4b509eb /intern
parent67eb2c7897188c2e5134ea7df7bdc26e08fa5a7a (diff)
Cycles: Resize light_data after possible light removal.
Diffstat (limited to 'intern')
-rw-r--r--intern/cycles/render/light.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/intern/cycles/render/light.cpp b/intern/cycles/render/light.cpp
index 817e1f5806c..1b7aa0ef52e 100644
--- a/intern/cycles/render/light.cpp
+++ b/intern/cycles/render/light.cpp
@@ -545,8 +545,6 @@ void LightManager::device_update_points(Device *device, DeviceScene *dscene, Sce
if(scene->lights.size() == 0)
return;
- float4 *light_data = dscene->light_data.resize(scene->lights.size()*LIGHT_SIZE);
-
/* remove background light? */
if(!(device->info.advanced_shading)) {
foreach(Light *light, scene->lights) {
@@ -557,6 +555,7 @@ void LightManager::device_update_points(Device *device, DeviceScene *dscene, Sce
}
}
+ float4 *light_data = dscene->light_data.resize(scene->lights.size()*LIGHT_SIZE);
int light_index = 0;
foreach(Light *light, scene->lights) {