Remove disabled code for freeing shaders on scene update

Some code for freeing shaders on scene updates (because of previous
dependency shaders had on lamps) had been disabled, as it is no longer
required. This removes that code altogether.
This commit is contained in:
Luca Rood
2017-06-26 18:16:05 +02:00
parent b50839038d
commit a48bd0db71

View File

@@ -512,30 +512,12 @@ static void scene_changed(Main *bmain, Scene *scene)
/* glsl */
for (ob = bmain->object.first; ob; ob = ob->id.next) {
#if 0 /* This was needed by old glsl where all lighting was statically linked into the shader. */
if (ob->gpulamp.first)
GPU_lamp_free(ob);
#endif
if (ob->mode & OB_MODE_TEXTURE_PAINT) {
BKE_texpaint_slots_refresh_object(scene, ob);
BKE_paint_proj_mesh_data_check(scene, ob, NULL, NULL, NULL, NULL);
GPU_drawobject_free(ob->derivedFinal);
}
}
#if 0 /* This was needed by old glsl where all lighting was statically linked into the shader. */
for (Material *ma = bmain->mat.first; ma; ma = ma->id.next)
if (ma->gpumaterial.first)
GPU_material_free(&ma->gpumaterial);
for (World *wo = bmain->world.first; wo; wo = wo->id.next)
if (wo->gpumaterial.first)
GPU_material_free(&wo->gpumaterial);
if (defmaterial.gpumaterial.first)
GPU_material_free(&defmaterial.gpumaterial);
#endif
}
void ED_render_id_flush_update(Main *bmain, ID *id)