Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

removed redundant triangles from flag drawing

  • Loading branch information...
commit e4631ee1b1bb50aad01f9ee7fff1f22e77dd6e94 1 parent afea962
@rtv authored
Showing with 13 additions and 7 deletions.
  1. +13 −7 libstage/model_draw.cc
View
20 libstage/model_draw.cc
@@ -544,9 +544,6 @@ void Model::DrawFlagList( void )
glVertex3f( gp.x+0, gp.y+d, gp.z+0 +z);
glVertex3f( gp.x+0, gp.y+0, gp.z-d +z);
- glVertex3f( gp.x-d, gp.y+0, gp.z+0 +z);
- glVertex3f( gp.x+0, gp.y-d, gp.z+0 +z);
- glVertex3f( gp.x+0, gp.y+0, gp.z-d +z);
glVertex3f( gp.x-d, gp.y+0, gp.z+0 +z);
glVertex3f( gp.x+0, gp.y-d, gp.z+0 +z);
@@ -557,13 +554,22 @@ void Model::DrawFlagList( void )
glVertex3f( gp.x+0, gp.y+0, gp.z-d +z);
glVertex3f( gp.x+d, gp.y+0, gp.z+0 +z);
- glVertex3f( gp.x+0, gp.y+d, gp.z+0 +z);
- glVertex3f( gp.x+0, gp.y+0, gp.z-d +z);
-
- glVertex3f( gp.x+d, gp.y+0, gp.z+0 +z);
glVertex3f( gp.x+0, gp.y-d, gp.z+0 +z);
glVertex3f( gp.x+0, gp.y+0, gp.z-d +z);
+
+ // for wire-frame we only need half of the 8 triangles
+
+ //glVertex3f( gp.x+d, gp.y+0, gp.z+0 +z);
+ //glVertex3f( gp.x+0, gp.y+d, gp.z+0 +z);
+ //glVertex3f( gp.x+0, gp.y+0, gp.z-d +z);
+
+ //glVertex3f( gp.x-d, gp.y+0, gp.z+0 +z);
+ //glVertex3f( gp.x+0, gp.y-d, gp.z+0 +z);
+ //glVertex3f( gp.x+0, gp.y+0, gp.z-d +z);
+
+ // and two more...
+
z += sz;
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.