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:
Diffstat (limited to 'source/blender/blenloader/intern/readfile.c')
-rw-r--r--source/blender/blenloader/intern/readfile.c32
1 files changed, 21 insertions, 11 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index dadae3a938a..322abc2ec60 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -1891,9 +1891,11 @@ void blo_make_image_pointer_map(FileData *fd, Main *oldmain)
if (ima->cache) {
oldnewmap_insert(fd->imamap, ima->cache, ima->cache, 0);
}
- for (a = 0; a < TEXTARGET_COUNT; a++) {
- if (ima->gputexture[a] != NULL) {
- oldnewmap_insert(fd->imamap, ima->gputexture[a], ima->gputexture[a], 0);
+ for (int eye = 0; eye < 2; eye++) {
+ for (a = 0; a < TEXTARGET_COUNT; a++) {
+ if (ima->gputexture[a][eye] != NULL) {
+ oldnewmap_insert(fd->imamap, ima->gputexture[a][eye], ima->gputexture[a][eye], 0);
+ }
}
}
if (ima->rr) {
@@ -1937,8 +1939,10 @@ void blo_end_image_pointer_map(FileData *fd, Main *oldmain)
if (ima->cache == NULL) {
ima->gpuflag = 0;
ima->gpuframenr = INT_MAX;
- for (i = 0; i < TEXTARGET_COUNT; i++) {
- ima->gputexture[i] = NULL;
+ for (int eye = 0; eye < 2; eye++) {
+ for (i = 0; i < TEXTARGET_COUNT; i++) {
+ ima->gputexture[i][eye] = NULL;
+ }
}
ima->rr = NULL;
}
@@ -1946,8 +1950,10 @@ void blo_end_image_pointer_map(FileData *fd, Main *oldmain)
slot->render = newimaadr(fd, slot->render);
}
- for (i = 0; i < TEXTARGET_COUNT; i++) {
- ima->gputexture[i] = newimaadr(fd, ima->gputexture[i]);
+ for (int eye = 0; eye < 2; eye++) {
+ for (i = 0; i < TEXTARGET_COUNT; i++) {
+ ima->gputexture[i][eye] = newimaadr(fd, ima->gputexture[i][eye]);
+ }
}
ima->rr = newimaadr(fd, ima->rr);
}
@@ -4140,14 +4146,18 @@ static void direct_link_image(FileData *fd, Image *ima)
if (!ima->cache) {
ima->gpuflag = 0;
ima->gpuframenr = INT_MAX;
- for (int i = 0; i < TEXTARGET_COUNT; i++) {
- ima->gputexture[i] = NULL;
+ for (int eye = 0; eye < 2; eye++) {
+ for (int i = 0; i < TEXTARGET_COUNT; i++) {
+ ima->gputexture[i][eye] = NULL;
+ }
}
ima->rr = NULL;
}
else {
- for (int i = 0; i < TEXTARGET_COUNT; i++) {
- ima->gputexture[i] = newimaadr(fd, ima->gputexture[i]);
+ for (int eye = 0; eye < 2; eye++) {
+ for (int i = 0; i < TEXTARGET_COUNT; i++) {
+ ima->gputexture[i][eye] = newimaadr(fd, ima->gputexture[i][eye]);
+ }
}
ima->rr = newimaadr(fd, ima->rr);
}