diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-04-13 04:43:49 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-04-13 04:43:49 +0400 |
commit | 2f9b7410dc712961f5684e4892660167c693cda8 (patch) | |
tree | 8898f0650969eba414f105fcf7edba10627a2968 /source/blender/editors | |
parent | 7cf1d86e4adc4893485e34229ccbc0537931c929 (diff) |
code cleanup: warnings + style
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/screen/glutil.c | 4 | ||||
-rw-r--r-- | source/blender/editors/sculpt_paint/paint_cursor.c | 10 | ||||
-rw-r--r-- | source/blender/editors/sculpt_paint/paint_utils.c | 8 |
3 files changed, 11 insertions, 11 deletions
diff --git a/source/blender/editors/screen/glutil.c b/source/blender/editors/screen/glutil.c index dd8c5fab0c6..932ff9b4887 100644 --- a/source/blender/editors/screen/glutil.c +++ b/source/blender/editors/screen/glutil.c @@ -1043,10 +1043,10 @@ void glaDrawImBuf_glsl(ImBuf *ibuf, float x, float y, int zoomfilter, return; /* Dithering is not supported on GLSL yet */ - force_fallback = ibuf->dither != 0.0f; + // force_fallback = ibuf->dither != 0.0f; /* Single channel images could not be transformed using GLSL yet */ - force_fallback = ibuf->channels == 1; + // force_fallback = ibuf->channels == 1; /* If user decided not to use GLSL, fallback to glaDrawPixelsAuto */ force_fallback = !ELEM(U.image_draw_method, diff --git a/source/blender/editors/sculpt_paint/paint_cursor.c b/source/blender/editors/sculpt_paint/paint_cursor.c index c104a5fac94..0422c2f82de 100644 --- a/source/blender/editors/sculpt_paint/paint_cursor.c +++ b/source/blender/editors/sculpt_paint/paint_cursor.c @@ -88,7 +88,7 @@ static int same_tex_snap(TexSnapshot *snap, Brush *brush, ViewContext *vc) //(mtex->brush_map_mode != MTEX_MAP_MODE_VIEW || //(BKE_brush_size_get(vc->scene, brush) <= snap->BKE_brush_size_get)) && - (mtex->brush_map_mode != MTEX_MAP_MODE_TILED || + (mtex->brush_map_mode != MTEX_MAP_MODE_TILED || (vc->ar->winx == snap->winx && vc->ar->winy == snap->winy)) ); @@ -230,8 +230,8 @@ static int load_tex(Brush *br, ViewContext *vc, float zoom, bool col) paint_get_tex_pixel_col(&br->mtex, x, y, rgba, pool); if (br->mtex.brush_map_mode == MTEX_MAP_MODE_VIEW) { - float curve_str = BKE_brush_curve_strength(br, len, 1); - CLAMP(curve_str, 0.0, 1.0); + float curve_str = BKE_brush_curve_strength(br, len, 1.0f); + CLAMP(curve_str, 0.0f, 1.0f); mul_v4_fl(rgba, curve_str); /* Falloff curve */ } buffer[index * 4] = rgba[0] * 255; @@ -245,10 +245,10 @@ static int load_tex(Brush *br, ViewContext *vc, float zoom, bool col) avg += br->texture_sample_bias; if (br->mtex.brush_map_mode == MTEX_MAP_MODE_VIEW) - avg *= BKE_brush_curve_strength(br, len, 1); /* Falloff curve */ + avg *= BKE_brush_curve_strength(br, len, 1.0f); /* Falloff curve */ /* clamp to avoid precision overflow */ - CLAMP(avg, 0.0, 1.0); + CLAMP(avg, 0.0f, 1.0f); buffer[index] = 255 - (GLubyte)(255 * avg); } } diff --git a/source/blender/editors/sculpt_paint/paint_utils.c b/source/blender/editors/sculpt_paint/paint_utils.c index 0bf27267c89..18ecd0cec84 100644 --- a/source/blender/editors/sculpt_paint/paint_utils.c +++ b/source/blender/editors/sculpt_paint/paint_utils.c @@ -206,10 +206,10 @@ void paint_get_tex_pixel_col(MTex *mtex, float u, float v, float rgba[4], struct rgba[2] = intensity; rgba[3] = 1.0f; } - CLAMP(rgba[0], 0.0, 1.0); - CLAMP(rgba[1], 0.0, 1.0); - CLAMP(rgba[2], 0.0, 1.0); - CLAMP(rgba[3], 0.0, 1.0); + CLAMP(rgba[0], 0.0f, 1.0f); + CLAMP(rgba[1], 0.0f, 1.0f); + CLAMP(rgba[2], 0.0f, 1.0f); + CLAMP(rgba[3], 0.0f, 1.0f); } /* 3D Paint */ |