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
diff options
context:
space:
mode:
authorDalai Felinto <dfelinto@gmail.com>2017-06-29 19:56:38 +0300
committerDalai Felinto <dfelinto@gmail.com>2017-06-29 19:57:06 +0300
commit2c62493891ae46af3c3c4b5475412127d0641c8e (patch)
tree1abfa0389a28942c65b9e209b97f217d19e7a5c9 /source/blender/editors/render/render_update.c
parent7c72079381e95964c70261aefc10e14ed25b979a (diff)
Eevee: No need to free all the gpu materials when world changes.
We have a world probe that is used to prevent exactly that.
Diffstat (limited to 'source/blender/editors/render/render_update.c')
-rw-r--r--source/blender/editors/render/render_update.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/source/blender/editors/render/render_update.c b/source/blender/editors/render/render_update.c
index 2986ece028b..42d914b1a71 100644
--- a/source/blender/editors/render/render_update.c
+++ b/source/blender/editors/render/render_update.c
@@ -471,10 +471,8 @@ static void texture_changed(Main *bmain, Tex *tex)
}
}
-static void world_changed(Main *bmain, World *wo)
+static void world_changed(Main *UNUSED(bmain), World *wo)
{
- Material *ma;
-
/* icons */
BKE_icon_changed(BKE_icon_id_ensure(&wo->id));
@@ -482,10 +480,6 @@ static void world_changed(Main *bmain, World *wo)
wo->update_flag = 1;
/* glsl */
- for (ma = bmain->mat.first; ma; ma = ma->id.next)
- if (ma->gpumaterial.first)
- GPU_material_free(&ma->gpumaterial);
-
if (defmaterial.gpumaterial.first)
GPU_material_free(&defmaterial.gpumaterial);