Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2011-09-11 09:10:27 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-09-11 09:10:27 +0400
commit57fcea44df7351c0c8de24b740d245c6fd445740 (patch)
treeb3f8cca148e53597157f4e02483d64edd35f639a /source/blender/editors
parentdd31b3265a78bccae2dab17e874a925c722b8b5a (diff)
draw grid lines in 1 loop rather then 2.
Diffstat (limited to 'source/blender/editors')
-rw-r--r--source/blender/editors/space_view3d/view3d_draw.c17
1 files changed, 7 insertions, 10 deletions
diff --git a/source/blender/editors/space_view3d/view3d_draw.c b/source/blender/editors/space_view3d/view3d_draw.c
index 227118da6f7..6b97d89325d 100644
--- a/source/blender/editors/space_view3d/view3d_draw.c
+++ b/source/blender/editors/space_view3d/view3d_draw.c
@@ -472,24 +472,21 @@ static void drawfloor(Scene *scene, View3D *v3d, const char **grid_unit)
for(a= -gridlines;a<=gridlines;a++) {
glColor3ubv((a % 10) ? col_grid_light : col_grid_emphasise);
- glBegin(GL_LINE_STRIP);
+
+ glBegin(GL_LINES);
+ /* Y axis */
vert[0]= a * grid_scale;
vert[1]= grid;
glVertex3fv(vert);
vert[1]= -grid;
glVertex3fv(vert);
- glEnd();
- }
- /* draw the X axis and/or grid lines */
- for(a= -gridlines;a<=gridlines;a++) {
- glColor3ubv((a % 10) ? col_grid_light : col_grid_emphasise);
- glBegin(GL_LINE_STRIP);
- vert[1]= a * grid_scale;
+ /* X axis */
+ SWAP(float, vert[0], vert[1]);
+ glVertex3fv(vert);
vert[0]= grid;
- glVertex3fv(vert );
- vert[0]= -grid;
glVertex3fv(vert);
+
glEnd();
}
}