From b39f4b788dc9c5ccc9430b02852cbc1cbe56eca1 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Sun, 27 Aug 2006 13:29:00 +0000 Subject: Texturepaint now supports all the imagepaint brush settings, with the exception of the clone tool. One level undo for image- and texturepaint, only storing those tiles that changed. Test to improve texturepaint performance using glTexSubImage2D, only enabled with 2^n sized textures and mipmapping off. Painting a 2048x2048 texture is then pretty smooth here, as long as the geometry is not too complex. --- source/blender/blenkernel/BKE_brush.h | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'source/blender/blenkernel/BKE_brush.h') diff --git a/source/blender/blenkernel/BKE_brush.h b/source/blender/blenkernel/BKE_brush.h index a55c8913c7f..52f86ef9c41 100644 --- a/source/blender/blenkernel/BKE_brush.h +++ b/source/blender/blenkernel/BKE_brush.h @@ -55,8 +55,10 @@ int brush_clone_image_set_nr(struct Brush *brush, int nr); int brush_clone_image_delete(struct Brush *brush); /* sampling */ -void brush_sample(struct Brush *brush, float *xy, float dist, float *rgb, float *alpha, short texonly); -struct ImBuf *brush_imbuf_new(struct Brush *brush, short flt, short texonly, int size); +float brush_sample_falloff(struct Brush *brush, float dist); +void brush_sample_tex(struct Brush *brush, float *xy, float *rgba); +void brush_imbuf_new(struct Brush *brush, short flt, short texfalloff, int size, + struct ImBuf **imbuf); /* painting */ struct BrushPainter; @@ -64,8 +66,11 @@ typedef struct BrushPainter BrushPainter; typedef int (*BrushFunc)(void *user, struct ImBuf *ibuf, float *lastpos, float *pos); BrushPainter *brush_painter_new(struct Brush *brush); -void brush_painter_require_imbuf(BrushPainter *painter, short flt, short texonly, int size); -int brush_painter_paint(BrushPainter *painter, BrushFunc func, float *pos, double time, void *user); +void brush_painter_require_imbuf(BrushPainter *painter, short flt, + short texonly, int size); +int brush_painter_paint(BrushPainter *painter, BrushFunc func, float *pos, + double time, void *user); +void brush_painter_break_stroke(BrushPainter *painter); void brush_painter_free(BrushPainter *painter); #endif -- cgit v1.2.3