how to draw a slice of a sphere with opengl?

there is function to draw a sphere in opengl,
but how can i draw a surface just as 1/8 sphere?3xs a lot

There’s no function to draw a sphere in OpenGL, but there is in GLU and GLUT.

Never mind, add some clipping planes before drawing the sphere, and use them to cut some parts of the sphere.