gluCylinder - joining

I have several gluCylinders in a row basically one after another to create a tube effect that turns, etc.

everything looks and works fine.

However there are spaces between the cylinders. How do i join all the cylinders togeter to make just one solid cylinder?

The cylinders twist and turn which is part of the reason there are spaces.

Is there a simple way to connect them all or do i need to re-write a cylinder script to do this?

GLUquadric* thA;
thA = gluNewQuadric();
gluQuadricNormals(thA, GLU_SMOOTH);
gluQuadricDrawStyle(thA, GLU_FILL );

for(------)
{
///do some translate and rotates
glucylinder(thA, radius, radius, distance, slices, stacks);

}

The quick way (if you don’t need to look inside the cylinders) is to render a sphere located at the intersection of the vectors passing along the axes of adjacent cylinders with same radius as the cylinder - basically a ball joint. Other options
require much more work.

Yeah that make sense.

Can i change the end point of the cylinders so they ‘tilt’?

Is there a GLUCYLINDER function i can copy and paste and modify to do what i need it to do?

The source for the glu is available online - try http://mesa3d.org/.

If you really want to render poly pipes you will need to look at something like GLE tubing and extrusion GLE Tubing and Extrusion Fact Sheet .
This is quite a big topic. The sdk only produces old OpenGL code.

There is my glhlib which has a function called glhCylinder.
It just computes the cylinder and gives you the indices and vertices. See the header file for an example. Sorry dude, it doesn’t do cylinder joining. Maybe in the future, I’ll add that.