Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 5 of 5

Thread: question about glucylinder

  1. #1
    Junior Member Newbie
    Join Date
    Apr 2005
    Posts
    13

    question about glucylinder

    how to make the cylinder to be solid?

  2. #2
    Junior Member Regular Contributor
    Join Date
    Jun 2004
    Location
    mexico
    Posts
    127

    Re: question about glucylinder

    hi, if you are using quadrics then it should be solid.

  3. #3
    Junior Member Newbie
    Join Date
    Apr 2005
    Posts
    13

    Re: question about glucylinder

    thanks ,use the function glucylinder(), the inner
    cylinder is empty.how to make it to be solid?

  4. #4
    Intern Contributor uruk's Avatar
    Join Date
    Dec 2004
    Location
    acasa :) sau la munca :(
    Posts
    66

    Re: question about glucylinder

    You will have to draw the caps. Two disks (gluDisk) one at the bottom and one at the top of your cylinder.
    Stat rosa pristina nomine, nomina nuda tenemus.

  5. #5
    Advanced Member Frequent Contributor Ehsan Kamrani's Avatar
    Join Date
    May 2005
    Location
    Iran
    Posts
    547

    Re: question about glucylinder

    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:

    GLUquadricObj 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.

    -Ehsan-
    <span style="color: #006600">-Ehsan-</span>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •