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/gpu/GPU_texture.h
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/gpu/GPU_texture.h')
-rw-r--r--source/blender/gpu/GPU_texture.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/source/blender/gpu/GPU_texture.h b/source/blender/gpu/GPU_texture.h
index a8e8ca72023..bb6af227369 100644
--- a/source/blender/gpu/GPU_texture.h
+++ b/source/blender/gpu/GPU_texture.h
@@ -36,6 +36,7 @@ struct ImageUser;
struct MovieClip;
struct MovieClipUser;
struct PreviewImage;
+struct ImBuf;
struct GPUFrameBuffer;
typedef struct GPUTexture GPUTexture;
@@ -187,7 +188,10 @@ GPUTexture *GPU_texture_create_from_vertbuf(struct GPUVertBuf *vert);
GPUTexture *GPU_texture_create_buffer(eGPUTextureFormat data_type, const uint buffer);
GPUTexture *GPU_texture_from_bindcode(int textarget, int bindcode);
-GPUTexture *GPU_texture_from_blender(struct Image *ima, struct ImageUser *iuser, int textarget);
+GPUTexture *GPU_texture_from_blender(struct Image *ima,
+ struct ImageUser *iuser,
+ struct ImBuf *ibuf,
+ int textarget);
GPUTexture *GPU_texture_from_preview(struct PreviewImage *prv, int mipmap);
/* movie clip drawing */