diff options
author | Jeroen Bakker <j.bakker@atmind.nl> | 2019-04-02 17:05:22 +0300 |
---|---|---|
committer | Jeroen Bakker <j.bakker@atmind.nl> | 2019-06-21 10:53:51 +0300 |
commit | fed6c1a970f1df14da7c5fd4dfaf84371efcbe5d (patch) | |
tree | cab4653b8d57d41bca6f1c45ef94b2601f8ea97c /source/blender/blenkernel/intern/movieclip.c | |
parent | a3a6cda8fb678432e0552d23b0226e8617f26e5f (diff) |
Fix T62876: Camera Background Images
Migrate old legacy code to the draw mamager/object mode. The old legacy
version did not work with wireframe. By migrating the code
to modern draw manager code we have mode control on the drawing process.
Still background images do not work with OIT, the cause seems to be that the transparent pixels are treated as background pixels.
Also There are some artifacts when working with Holdouts and DoF, this
is because the draw engines do not pass the correct alpha values.
Reviewers: fclem, brecht
Differential Revision: https://developer.blender.org/D4638
Diffstat (limited to 'source/blender/blenkernel/intern/movieclip.c')
-rw-r--r-- | source/blender/blenkernel/intern/movieclip.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/movieclip.c b/source/blender/blenkernel/intern/movieclip.c index c377223d14b..6bc83f8dd09 100644 --- a/source/blender/blenkernel/intern/movieclip.c +++ b/source/blender/blenkernel/intern/movieclip.c @@ -67,6 +67,8 @@ #include "DEG_depsgraph.h" #include "DEG_depsgraph_query.h" +#include "GPU_texture.h" + #ifdef WITH_OPENEXR # include "intern/openexr/openexr_multi.h" #endif @@ -1353,6 +1355,17 @@ static void free_buffers(MovieClip *clip) IMB_free_anim(clip->anim); clip->anim = NULL; } + + MovieClip_RuntimeGPUTexture *tex; + for (tex = clip->runtime.gputextures.first; tex; tex = tex->next) { + for (int i = 0; i < TEXTARGET_COUNT; i++) { + if (tex->gputexture[i] != NULL) { + GPU_texture_free(tex->gputexture[i]); + tex->gputexture[i] = NULL; + } + } + } + BLI_freelistN(&clip->runtime.gputextures); } void BKE_movieclip_clear_cache(MovieClip *clip) |