From c502114ee11dcd2e737452944b652205517b5682 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Sat, 6 Feb 2016 20:43:44 +0100 Subject: Cycles: Solve issues with auto-disabled MIS There were two issues: 1. Memory leak: std:;erase does not call delete on the pointer (which is actually a good idea), 2. After MIS was disabled in viewport render there was no way to bring MIS back. Now instead of removing light from the scene data we kind of tagging it for an ignore. Possible cleanup would be to add Light::is_enabled and use that instead of passing weird and wonderful function arguments. --- intern/cycles/render/light.h | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'intern/cycles/render/light.h') diff --git a/intern/cycles/render/light.h b/intern/cycles/render/light.h index afec3628dda..bba03e33a86 100644 --- a/intern/cycles/render/light.h +++ b/intern/cycles/render/light.h @@ -82,9 +82,18 @@ public: void tag_update(Scene *scene); protected: - void device_update_points(Device *device, DeviceScene *dscene, Scene *scene); + bool skip_background_light(Device *device, Scene *scene); + + void device_update_points(Device *device, + DeviceScene *dscene, + Scene *scene, + bool skip_background); void device_update_distribution(Device *device, DeviceScene *dscene, Scene *scene, Progress& progress); - void device_update_background(Device *device, DeviceScene *dscene, Scene *scene, Progress& progress); + void device_update_background(Device *device, + DeviceScene *dscene, + Scene *scene, + Progress& progress, + bool skip_background); }; CCL_NAMESPACE_END -- cgit v1.2.3