View Full Version : glutWireSphere() equivalent?
joeyTR
03-25-2003, 11:57 AM
Hi http://www.opengl.org/discussion_boards/ubb/smile.gif
Do you know any straight OpenGL code equivalent to glut's glutWireSphere()?
void glutWireSphere(GLdouble radius,
GLint slices, GLint stacks);
Thank you http://www.opengl.org/discussion_boards/ubb/smile.gif
shinpaughp
03-25-2003, 12:29 PM
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.
mdog1234
03-25-2003, 01:39 PM
use quadrics
nexusone
03-25-2003, 05:35 PM
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:
Hi http://www.opengl.org/discussion_boards/ubb/smile.gif
Do you know any straight OpenGL code equivalent to glut's glutWireSphere()?
void glutWireSphere(GLdouble radius,
GLint slices, GLint stacks);
Thank you http://www.opengl.org/discussion_boards/ubb/smile.gif
Relic
03-26-2003, 01:35 AM
Have you looked into the GLUT sources? Just copy the glutWireSphere implementation, if don't need the rest of GLUT. (Where's the beef?)
joeyTR
03-26-2003, 11:04 AM
Thank you guys http://www.opengl.org/discussion_boards/ubb/smile.gif
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 http://www.opengl.org/discussion_boards/ubb/wink.gif
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?)
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.