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:
authorDalai Felinto <dalai@blender.org>2020-03-12 19:21:58 +0300
committerDalai Felinto <dalai@blender.org>2020-03-13 17:40:20 +0300
commit5593efec01c211a55324b0e96ab6773aa713bd40 (patch)
treeda3c327f873da540279ae0f92b55526f54f81481 /source/blender/makesrna/intern/rna_image.c
parent93ac4709ebe8c3be3d26b376248ce263ecc1974e (diff)
Fix stereoscopy drawing for camera background
Part of the fix was to get gputexture to use an array to accomodate each eye. This takes care of viewports showing individual Left or Right views. For the combined view the fix was in overlay_image.c:camera_background_images_stereo_setup. Note 1: Referece images are still not supporting stereo. Note 2: For painting, and getting image bindcode I'm hardcording a single-view experience. Note 3: Without D6922 stereo is too broken to even test this patch. With D6922 + this patch the fullscreen modes work (anaglyph/interlace not yet). Differential Revision: D7143
Diffstat (limited to 'source/blender/makesrna/intern/rna_image.c')
-rw-r--r--source/blender/makesrna/intern/rna_image.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/makesrna/intern/rna_image.c b/source/blender/makesrna/intern/rna_image.c
index b8174f094ec..8f2a841b55c 100644
--- a/source/blender/makesrna/intern/rna_image.c
+++ b/source/blender/makesrna/intern/rna_image.c
@@ -398,7 +398,7 @@ static void rna_Image_resolution_set(PointerRNA *ptr, const float *values)
static int rna_Image_bindcode_get(PointerRNA *ptr)
{
Image *ima = (Image *)ptr->data;
- GPUTexture *tex = ima->gputexture[TEXTARGET_TEXTURE_2D];
+ GPUTexture *tex = ima->gputexture[TEXTARGET_TEXTURE_2D][0];
return (tex) ? GPU_texture_opengl_bindcode(tex) : 0;
}