glutWireSphere() equivalent?

Hi

Do you know any straight OpenGL code equivalent to glut’s glutWireSphere()?

void glutWireSphere(GLdouble radius,
GLint slices, GLint stacks);

Thank you

You could use gluSphere and for wireframe set glPolygonMode to GL_LINE for front and/or back faces. Should give you similar results. Or write your own sphere function.

use quadrics

Straight openGL does not have any primitive objects like sphere, cubes, etc.

But you can use the glu library instead of the glut, which has some primitives.

gluSphere can be rendered in line mode, which would give you a wire sphere.

Originally posted by joeyTR:
[b]Hi

Do you know any straight OpenGL code equivalent to glut’s glutWireSphere()?

void glutWireSphere(GLdouble radius,
GLint slices, GLint stacks);

Thank you [/b]

Have you looked into the GLUT sources? Just copy the glutWireSphere implementation, if don’t need the rest of GLUT. (Where’s the beef?)

Thank you guys

You’ve been very helpful, I made the conversion quite easily.

Relic, I just saw your post and you are absolutely right. Great tip for the future

Originally posted by Relic:
Have you looked into the GLUT sources? Just copy the glutWireSphere implementation, if don’t need the rest of GLUT. (Where’s the beef?)