disable texture clamping while painting.
authorCampbell Barton <ideasman42@gmail.com>
Wed, 18 Feb 2009 03:56:16 +0000 (03:56 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Wed, 18 Feb 2009 03:56:16 +0000 (03:56 +0000)
source/blender/gpu/intern/gpu_draw.c
source/blender/src/editface.c

index 84bed5ccdbd3c82a053d79ff1330ab81583a6d07..3c1c280a7275e2940275c7b0048add88309a7fa6 100644 (file)
@@ -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;
index 9872469030abe7a3838092c3288f9454eddd69f9..f6a0b88cbc8db0035b12524281e71839d3b1b57a 100644 (file)
@@ -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);
        }