Is there an existing unit for drawing 3d geometrical shapes like cube/sphere/cylinder/cone/capsule etc?

Glu cannot be used as i want to draw the shapes using an vertex buffer objects with GL_TRIANGLES .

Also i am trying to write some function doing 3d drawing so far i am only happy with the cube and sphere code, for the cylinder i made several attempts but none of them work like i expect them. My attempt in glmodel is not working nice enough with the sphere shape in order to make a 3d capsule shape.

So thanks in advance for your help.