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
This commit is contained in:
2020-03-12 17:21:58 +01:00
parent 93ac4709eb
commit 5593efec01
6 changed files with 90 additions and 62 deletions

View File

@@ -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;
}