create cylinder

how to create cylinder using opengl??

hi

Have a look at this api - gluCylinder

Some reference at
glucylinder

  • S

first define a quadric variant
GluQuadricObj *Obj

then create a quadric by
Obj = GluNewQuadric();

Finally you can use the function
GluCylinder( *Obj, BaseRadius, TopRadius, Height,…) to create a cylinder