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
path: root/source
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2012-02-14 01:12:14 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2012-02-14 01:12:14 +0400
commit873386b22d13de716b0d0b70fdf4a8acc97ae18b (patch)
tree60f0de95b08fbcbbc222290be92155aa53eee038 /source
parent19ff61bfb3c817ae5707bac1911c062eea98a292 (diff)
Fix #30170: with file saved in texture painting mode, when going to object mode
the image texture is missing. The flag to indicate that the mipmap levels were already loaded into GPU memory was incorrectly set then.
Diffstat (limited to 'source')
-rw-r--r--source/blender/gpu/intern/gpu_draw.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/source/blender/gpu/intern/gpu_draw.c b/source/blender/gpu/intern/gpu_draw.c
index 926faeb417e..1cd79746aee 100644
--- a/source/blender/gpu/intern/gpu_draw.c
+++ b/source/blender/gpu/intern/gpu_draw.c
@@ -732,6 +732,8 @@ void GPU_paint_set_mipmap(int mipmap)
else
GPU_free_image(ima);
}
+ else
+ ima->tpageflag &= ~IMA_MIPMAP_COMPLETE;
}
}
@@ -742,6 +744,8 @@ void GPU_paint_set_mipmap(int mipmap)
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, gpu_get_mipmap_filter(1));
}
+ else
+ ima->tpageflag &= ~IMA_MIPMAP_COMPLETE;
}
}
}
@@ -939,7 +943,6 @@ void GPU_free_image(Image *ima)
if(ima->bindcode) {
glDeleteTextures(1, (GLuint *)&ima->bindcode);
ima->bindcode= 0;
- ima->tpageflag &= ~IMA_MIPMAP_COMPLETE;
}
/* free glsl image binding */
@@ -954,8 +957,9 @@ void GPU_free_image(Image *ima)
MEM_freeN(ima->repbind);
ima->repbind= NULL;
- ima->tpageflag &= ~IMA_MIPMAP_COMPLETE;
}
+
+ ima->tpageflag &= ~IMA_MIPMAP_COMPLETE;
}
void GPU_free_images(void)