diff options
author | Lukas Tönne <lukas.toenne@gmail.com> | 2014-11-05 19:25:50 +0300 |
---|---|---|
committer | Lukas Tönne <lukas.toenne@gmail.com> | 2015-01-20 11:30:06 +0300 |
commit | 7dda1ea396fd584dc532faa0ff30a87c1e1a7629 (patch) | |
tree | 72e286ecd6c28808a5bc134b10869c7d870bdaa5 /source/blender/editors | |
parent | 211be0ae6e8883b846689dd3bceba6408e5689a9 (diff) |
Debug grid drawing for hair volume was drawing one subdivision too many.
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/space_view3d/drawobject.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/source/blender/editors/space_view3d/drawobject.c b/source/blender/editors/space_view3d/drawobject.c index 9dfcedceb61..8e1587f9630 100644 --- a/source/blender/editors/space_view3d/drawobject.c +++ b/source/blender/editors/space_view3d/drawobject.c @@ -5227,22 +5227,22 @@ static void draw_new_particle_system(Scene *scene, View3D *v3d, RegionView3D *rv UI_ThemeColorShadeAlpha(TH_WIRE, 0, -100); glEnable(GL_BLEND); glBegin(GL_LINES); - for (i = 1; i < res[0]; ++i) { - float f = interpf(b[0], a[0], (float)i / (float)res[0]); + for (i = 1; i < res[0]-1; ++i) { + float f = interpf(b[0], a[0], (float)i / (float)(res[0]-1)); glVertex3f(f, a[1], a[2]); glVertex3f(f, b[1], a[2]); glVertex3f(f, b[1], a[2]); glVertex3f(f, b[1], b[2]); glVertex3f(f, b[1], b[2]); glVertex3f(f, a[1], b[2]); glVertex3f(f, a[1], b[2]); glVertex3f(f, a[1], a[2]); } - for (i = 1; i < res[1]; ++i) { - float f = interpf(b[1], a[1], (float)i / (float)res[1]); + for (i = 1; i < res[1]-1; ++i) { + float f = interpf(b[1], a[1], (float)i / (float)(res[1]-1)); glVertex3f(a[0], f, a[2]); glVertex3f(b[0], f, a[2]); glVertex3f(b[0], f, a[2]); glVertex3f(b[0], f, b[2]); glVertex3f(b[0], f, b[2]); glVertex3f(a[0], f, b[2]); glVertex3f(a[0], f, b[2]); glVertex3f(a[0], f, a[2]); } - for (i = 1; i < res[2]; ++i) { - float f = interpf(b[2], a[2], (float)i / (float)res[2]); + for (i = 1; i < res[2]-1; ++i) { + float f = interpf(b[2], a[2], (float)i / (float)(res[2]-1)); glVertex3f(a[0], a[1], f); glVertex3f(b[0], a[1], f); glVertex3f(b[0], a[1], f); glVertex3f(b[0], b[1], f); glVertex3f(b[0], b[1], f); glVertex3f(a[0], b[1], f); |