diff options
author | Lukas Tönne <lukas.toenne@gmail.com> | 2014-11-10 13:34:36 +0300 |
---|---|---|
committer | Lukas Tönne <lukas.toenne@gmail.com> | 2015-01-20 11:30:07 +0300 |
commit | 62d9aa05ab3db2c682184ecc500ef67ff8a5bd3b (patch) | |
tree | e07b613177343092f6e7b34b8481ee4060bd63b1 /source/blender/editors | |
parent | 046510fcf931eae9fd65c546b235b45f084a9118 (diff) |
Fix for grid drawing in 3D view, was using one less grid cell.
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 8e1587f9630..4b566b6f519 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]-1; ++i) { - float f = interpf(b[0], a[0], (float)i / (float)(res[0]-1)); + for (i = 1; i < res[0]; ++i) { + float f = interpf(b[0], a[0], (float)i / (float)(res[0])); 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]-1; ++i) { - float f = interpf(b[1], a[1], (float)i / (float)(res[1]-1)); + for (i = 1; i < res[1]; ++i) { + float f = interpf(b[1], a[1], (float)i / (float)(res[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]-1; ++i) { - float f = interpf(b[2], a[2], (float)i / (float)(res[2]-1)); + for (i = 1; i < res[2]; ++i) { + float f = interpf(b[2], a[2], (float)i / (float)(res[2])); 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); |