diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2022-04-18 16:45:32 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2022-04-19 13:09:18 +0300 |
commit | 6296cb5129697676aa0055bb2162bd479106f6e3 (patch) | |
tree | b8720982fb16e543c9fdd02d9748b13cff9384d7 /source/blender/draw/engines/overlay/overlay_extra.c | |
parent | eccc9d8eba8d65009307ebc7d4da344e9416d89b (diff) |
DRW: Centralize smoke domain texture management
This code was duplicated in multiple engines. Now it is the draw manager
responsability to manage the throwaway fluid textures.
Diffstat (limited to 'source/blender/draw/engines/overlay/overlay_extra.c')
-rw-r--r-- | source/blender/draw/engines/overlay/overlay_extra.c | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/source/blender/draw/engines/overlay/overlay_extra.c b/source/blender/draw/engines/overlay/overlay_extra.c index abcca5525c7..5d8ba06e181 100644 --- a/source/blender/draw/engines/overlay/overlay_extra.c +++ b/source/blender/draw/engines/overlay/overlay_extra.c @@ -1474,23 +1474,6 @@ static void OVERLAY_volume_extra(OVERLAY_ExtraCallBuffers *cb, } if (draw_velocity || show_gridlines) { - BLI_addtail(&data->stl->pd->smoke_domains, BLI_genericNodeN(fmd)); - } -} - -static void OVERLAY_volume_free_smoke_textures(OVERLAY_Data *data) -{ - /* Free Smoke Textures after rendering */ - /* XXX This is a waste of processing and GPU bandwidth if nothing - * is updated. But the problem is since Textures are stored in the - * modifier we don't want them to take precious VRAM if the - * modifier is not used for display. We should share them for - * all viewport in a redraw at least. */ - LinkData *link; - while ((link = BLI_pophead(&data->stl->pd->smoke_domains))) { - FluidModifierData *fmd = (FluidModifierData *)link->data; - DRW_smoke_free_velocity(fmd); - MEM_freeN(link); } } @@ -1624,8 +1607,6 @@ void OVERLAY_extra_draw(OVERLAY_Data *vedata) void OVERLAY_extra_in_front_draw(OVERLAY_Data *vedata) { DRW_draw_pass(vedata->psl->extra_ps[1]); - - OVERLAY_volume_free_smoke_textures(vedata); } void OVERLAY_extra_centers_draw(OVERLAY_Data *vedata) |