diff options
author | Campbell Barton <ideasman42@gmail.com> | 2009-02-18 06:56:16 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2009-02-18 06:56:16 +0300 |
commit | 7a9688179580e3b1008941f339bdc906fa544360 (patch) | |
tree | ce934765179f501092dbc31b285e8e80c426ddb9 | |
parent | f6b0b76fea40394059e575b844e5bf71f255e35f (diff) |
disable texture clamping while painting.
-rw-r--r-- | source/blender/gpu/intern/gpu_draw.c | 5 | ||||
-rw-r--r-- | source/blender/src/editface.c | 10 |
2 files changed, 14 insertions, 1 deletions
diff --git a/source/blender/gpu/intern/gpu_draw.c b/source/blender/gpu/intern/gpu_draw.c index 84bed5ccdbd..3c1c280a727 100644 --- a/source/blender/gpu/intern/gpu_draw.c +++ b/source/blender/gpu/intern/gpu_draw.c @@ -167,6 +167,8 @@ static int smaller_pow2(int num) static int is_pow2_limit(int num) { /* take texture clamping into account */ + if (G.f & G_TEXTUREPAINT) + return 1; if (U.glreslimit != 0 && num > U.glreslimit) return 0; @@ -175,6 +177,9 @@ static int is_pow2_limit(int num) static int smaller_pow2_limit(int num) { + if (G.f & G_TEXTUREPAINT) + return 1; + /* take texture clamping into account */ if (U.glreslimit != 0 && num > U.glreslimit) return U.glreslimit; diff --git a/source/blender/src/editface.c b/source/blender/src/editface.c index 9872469030a..f6a0b88cbc8 100644 --- a/source/blender/src/editface.c +++ b/source/blender/src/editface.c @@ -51,6 +51,7 @@ #include "DNA_space_types.h" #include "DNA_screen_types.h" #include "DNA_scene_types.h" +#include "DNA_userdef_types.h" #include "DNA_view3d_types.h" #include "BKE_brush.h" @@ -1321,6 +1322,10 @@ void set_texturepaint() /* toggle */ if(G.f & G_TEXTUREPAINT) { G.f &= ~G_TEXTUREPAINT; + + if (U.glreslimit != 0) + GPU_free_images(); + GPU_paint_set_mipmap(1); } else if (me) { @@ -1328,7 +1333,10 @@ void set_texturepaint() /* toggle */ if(me->mtface==NULL) make_tfaces(me); - + + if (U.glreslimit != 0) + GPU_free_images(); + brush_check_exists(&G.scene->toolsettings->imapaint.brush); GPU_paint_set_mipmap(0); } |