1 error corrected in display list of glCylinder

This commit is contained in:
Nico Pietroni 2005-03-03 13:11:30 +00:00
parent 0663f16525
commit 5ce9f028b7
1 changed files with 8 additions and 5 deletions

View File

@ -217,8 +217,8 @@ namespace vcg
glVertex3d(p0[0],p0[1],p0[2]); glVertex3d(p0[0],p0[1],p0[2]);
} }
glEnd(); glEnd();
glEndList();
} }
glEndList();
} }
glCallList(cone_List); glCallList(cone_List);
///I insert key and value in the map if I need ///I insert key and value in the map if I need
@ -238,13 +238,13 @@ namespace vcg
static void glArrow(Point3d tail, Point3d head,double body_width,double head_lenght, static void glArrow(Point3d tail, Point3d head,double body_width,double head_lenght,
double head_width,int body_slice=10,int head_slice=10) double head_width,int body_slice=10,int head_slice=10)
{ {
Matrix44d tr; assert(!glGetError());
Matrix44d tr;
XAxis(tail,head,tr); XAxis(tail,head,tr);
glPushAttrib(GL_ALL_ATTRIB_BITS); glPushAttrib(GL_ALL_ATTRIB_BITS);
SetGLParameters(dm); SetGLParameters(dm);
glPushMatrix(); glPushMatrix();
glMultMatrixd(&tr[0][0]); glMultMatrixd(&tr[0][0]);
//Arrow( (head-tail).Norm(),body_width,head_lenght,head_width,body_size,head_size);
vcg::Point3d Direct=(head-tail); vcg::Point3d Direct=(head-tail);
double l_body=Direct.Norm()-head_lenght; double l_body=Direct.Norm()-head_lenght;
glPushMatrix(); glPushMatrix();
@ -254,7 +254,9 @@ namespace vcg
glTranslate(vcg::Point3d(l_body,0,0)); glTranslate(vcg::Point3d(l_body,0,0));
Cone(head_slice,head_lenght,head_width); Cone(head_slice,head_lenght,head_width);
glPopMatrix(); glPopMatrix();
assert(!glGetError());
glPopAttrib(); glPopAttrib();
assert(!glGetError());
} }
/// draw a cone from tail to head /// draw a cone from tail to head
@ -291,8 +293,9 @@ namespace vcg
double l_body=Direct.Norm(); double l_body=Direct.Norm();
glTranslate(vcg::Point3d(tail.Norm(),0,0)); glTranslate(vcg::Point3d(tail.Norm(),0,0));
Cylinder(slice,l_body,width); Cylinder(slice,l_body,width);
glPopAttrib();
glPopMatrix(); glPopMatrix();
glPopAttrib();
} }