View Full Version : question about glucylinder
05-18-2005, 04:28 PM
how to make the cylinder to be solid?
05-18-2005, 04:41 PM
hi, if you are using quadrics then it should be solid.
05-18-2005, 05:00 PM
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.
05-18-2005, 10:18 PM
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.
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.