how to make the cylinder to be solid?
hi, if you are using quadrics then it should be solid.
thanks ,use the function glucylinder(), the inner
cylinder is empty.how to make it to be solid?
You will have to draw the caps. Two disks (gluDisk) one at the bottom and one at the top of your cylinder.
If you want to draw the solid cylinders, an easy way is to use the OpenGL quadrics.With the function gluQuadricDrawStyle you can specify the style of your quadrics:
void gluQuadricDrawStyle( GLUquardicObj *obj, GLenum style );
Sets the drawing style(GLU_POINT, GLU_LINE, GLU_FILL, and GLU_SILHOUETTE ) for quardic object obj
Here’s a code that draws the solid cylinder:
cylinder = gluNewQuadric();
gluQuadricDrawStyle( cylinder, GLU_FILL );
gluCylinder( cylinder, 5, 0, 5, 15, 15 );
Note: gluCylinder isn’t a good way to do graphics.It’s for beginners.If you want to write a real-time application,you should use your algorithms to draw solid cylinders.