OpenGl draw a cylinder with 2 points glRotated
问题 I want to show draw a cylinder that starts at point a and that points to I think the key is in the first glRotated, but this is my first time working with openGL a and b are btVector3 glPushMatrix(); glTranslatef(a.x(), a.y(), a.z()); glRotated(0, b.x(), b.y(), b.z()); glutSolidCylinder(.01, .10 ,20,20); glPopMatrix(); Any suggestions ?? 回答1: According to glutsolidcylinder(3) - Linux man page: glutSolidCylinder() draws a shaded cylinder, the center of whose base is at the origin and whose