diff options
author | Luca Rood <dev@lucarood.com> | 2017-06-26 18:53:47 +0300 |
---|---|---|
committer | Luca Rood <dev@lucarood.com> | 2017-06-26 18:53:47 +0300 |
commit | b50839038d6b3d20e52896cadff5076b94cf3705 (patch) | |
tree | 0d7304686eb1e71646659317847c205467a455ba /source/blender/editors/render/render_update.c | |
parent | bafb90480706ad0c380a8eb1907beb046bfbcf1e (diff) |
Stop object shaders from being updated when changing lamp properties
Object shaders no longer depend on lamp data at compile time, thus they
don't need to be invalidated when lamps change. Disabling shader
recompilation allows fast viewport updates when changing lamp settings.
Note that even though shaders for lamps are currently not being used,
`lamp_changed` is still freeing the lamp shaders, as at some point we
might want to use shaders for lamps...
Diffstat (limited to 'source/blender/editors/render/render_update.c')
-rw-r--r-- | source/blender/editors/render/render_update.c | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/source/blender/editors/render/render_update.c b/source/blender/editors/render/render_update.c index b8f64c1db58..badcfee0533 100644 --- a/source/blender/editors/render/render_update.c +++ b/source/blender/editors/render/render_update.c @@ -348,7 +348,6 @@ static void material_changed(Main *bmain, Material *ma) static void lamp_changed(Main *bmain, Lamp *la) { Object *ob; - Material *ma; /* icons */ BKE_icon_changed(BKE_icon_id_ensure(&la->id)); @@ -358,10 +357,6 @@ static void lamp_changed(Main *bmain, Lamp *la) if (ob->data == la && ob->gpulamp.first) GPU_lamp_free(ob); - 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); } |