disable texture clamping while painting.

This commit is contained in:
Campbell Barton 2009-02-18 03:56:16 +00:00
parent f6b0b76fea
commit 7a96881795
2 changed files with 14 additions and 1 deletions

@ -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;

@ -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);
}