PDA

View Full Version : glutSolidSphere VS. gluSphere



jbarton
03-28-2002, 11:58 AM
What is the difference in the glut versions and the glu versions of functions?

Just Curious. http://www.opengl.org/discussion_boards/ubb/confused.gif

nexusone
03-28-2002, 12:27 PM
The glut one does not create texture coordinates vs. the glu which has the option.

The main reason for glutSphere and other prebuilt objects was to replace the functions in the glaux library.

You would use glut_____Sphere when you just need a quick way to draw a simple object like in a demo or example.

gluSphere would be for if you need more advanced features.

http://www.opengl.org/discussion_boards/ubb/smile.gif


Originally posted by jbarton:
What is the difference in the glut versions and the glu versions of functions?

Just Curious. http://www.opengl.org/discussion_boards/ubb/confused.gif

jbarton
03-28-2002, 12:42 PM
So the glut functions are generally more simplistic versions of the glu functions.

Thanks, http://www.opengl.org/discussion_boards/ubb/biggrin.gif

zed
03-28-2002, 01:58 PM
check the source for glut at lib/glut directory. u will see for the sphere it actually calls glusphere

void APIENTRY
glutSolidSphere(GLdouble radius, GLint slices, GLint stacks)
{
QUAD_OBJ_INIT();
gluQuadricDrawStyle(quadObj, GLU_FILL);
gluQuadricNormals(quadObj, GLU_SMOOTH);
/* If we ever changed/used the texture or orientation state
of quadObj, we'd need to change it to the defaults here
with gluQuadricTexture and/or gluQuadricOrientation. */
gluSphere(quadObj, radius, slices, stacks);
}

jbarton
03-28-2002, 02:04 PM
Thanks All!