diff options
author | Antony Riakiotakis <kalast@gmail.com> | 2012-06-08 17:06:06 +0400 |
---|---|---|
committer | Antony Riakiotakis <kalast@gmail.com> | 2012-06-08 17:06:06 +0400 |
commit | 68c365e2f040cb61266d6ef1309fb22d064ab0d0 (patch) | |
tree | 6831ee19518a0a43cdf733a2273e9542e160f774 | |
parent | 477d12d1fc106fcbb91f0eb4071e2bb1ca47b196 (diff) |
Index: source/blender/gpu/intern/gpu_draw.c
===================================================================
--- source/blender/gpu/intern/gpu_draw.c (revision 47568)
+++ source/blender/gpu/intern/gpu_draw.c (working copy)
@@ -230,11 +230,12 @@
Image *ima, *curima;
int domipmap, linearmipmap;
+ int texpaint; /* store this so that new images created while texture painting won't be set to mipmapped */
int alphablend;
float anisotropic;
MTFace *lasttface;
-} GTS = {0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 1, 0, -1, 1.f, NULL};
+} GTS = {0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 1, 0, 0, -1, 1.f, NULL};
/* Mipmap settings */
@@ -256,7 +257,7 @@
static int gpu_get_mipmap(void)
{
- return GTS.domipmap;
+ return GTS.domipmap && !GTS.texpaint;
}
static GLenum gpu_get_mipmap_filter(int mag)
@@ -730,6 +731,8 @@
if (!GTS.domipmap)
return;
+ GTS.texpaint = !mipmap;
+
if (mipmap) {
for (ima=G.main->image.first; ima; ima=ima->id.next) {
if (ima->bindcode) {
-rw-r--r-- | source/blender/gpu/intern/gpu_draw.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/source/blender/gpu/intern/gpu_draw.c b/source/blender/gpu/intern/gpu_draw.c index 7ae4aa550f9..3e53f2f3836 100644 --- a/source/blender/gpu/intern/gpu_draw.c +++ b/source/blender/gpu/intern/gpu_draw.c @@ -230,11 +230,12 @@ static struct GPUTextureState { Image *ima, *curima; int domipmap, linearmipmap; + int texpaint; /* store this so that new images created while texture painting won't be set to mipmapped */ int alphablend; float anisotropic; MTFace *lasttface; -} GTS = {0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 1, 0, -1, 1.f, NULL}; +} GTS = {0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 1, 0, 0, -1, 1.f, NULL}; /* Mipmap settings */ @@ -256,7 +257,7 @@ void GPU_set_linear_mipmap(int linear) static int gpu_get_mipmap(void) { - return GTS.domipmap; + return GTS.domipmap && !GTS.texpaint; } static GLenum gpu_get_mipmap_filter(int mag) @@ -730,6 +731,8 @@ void GPU_paint_set_mipmap(int mipmap) if (!GTS.domipmap) return; + GTS.texpaint = !mipmap; + if (mipmap) { for (ima=G.main->image.first; ima; ima=ima->id.next) { if (ima->bindcode) { |