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...
This commit is contained in:
Luca Rood 2017-06-26 17:53:47 +02:00
parent bafb904807
commit b50839038d
Notes: blender-bot 2023-02-14 08:06:38 +01:00
Referenced by commit 2325d15d02, Lamps should not have their own gpu material
1 changed files with 0 additions and 5 deletions

View File

@ -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);
}