Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeroen Bakker <jeroen@blender.org>2020-01-27 18:28:55 +0300
committerJeroen Bakker <jeroen@blender.org>2020-01-29 17:07:45 +0300
commit18c88eac171a814f94142d442494ea6f5eeeab02 (patch)
tree9a5fbc81db038a3d322b818e520d93c520e7da1e /source/blender/makesrna/intern/rna_image_api.c
parentb683fcb62876f345a49bf66c94781a6fa789b946 (diff)
Fix T73188: RenderResult as Camera BG Image
In blender 2.79 you could use a render result as a camera background image. This is useful during layout/compositing. During Blender 2.80 development there were 2 issues introduced that removed this feature. * to receive a render result the image required a lock. This lock wasn't passed and therefore no image was read from the result. Generating an GPUTexture from an Blender image also didn't do the locking. * the iuser->scene field wasn't set what is required for render results. This change adds an optional `ibuf` parameter to `GPU_texture_from_blender` that can be passed when available. Reviewed By: fclem, brecht Differential Revision: https://developer.blender.org/D6684
Diffstat (limited to 'source/blender/makesrna/intern/rna_image_api.c')
-rw-r--r--source/blender/makesrna/intern/rna_image_api.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/makesrna/intern/rna_image_api.c b/source/blender/makesrna/intern/rna_image_api.c
index cc1a0cff08b..7b5612ef8e7 100644
--- a/source/blender/makesrna/intern/rna_image_api.c
+++ b/source/blender/makesrna/intern/rna_image_api.c
@@ -222,7 +222,7 @@ static int rna_Image_gl_load(Image *image, ReportList *reports, int frame)
BKE_imageuser_default(&iuser);
iuser.framenr = frame;
- GPUTexture *tex = GPU_texture_from_blender(image, &iuser, GL_TEXTURE_2D);
+ GPUTexture *tex = GPU_texture_from_blender(image, &iuser, NULL, GL_TEXTURE_2D);
if (tex == NULL) {
BKE_reportf(reports, RPT_ERROR, "Failed to load image texture '%s'", image->id.name + 2);