I am working with opengl and noticed that you can render glutSolidcone and glutWirecone, etc… I was wondering if there is a world option to set so that opengl draws the world in wireframes if you give it a command such as glBegin(GL_POLYGONS)…
No, glut objects are pre-built and can not be changed.
You can use glu objects, or create the sphere with your own sphere routine using glBegin.
Originally posted by tzano:
I am working with opengl and noticed that you can render glutSolidcone and glutWirecone, etc… I was wondering if there is a world option to set so that opengl draws the world in wireframes if you give it a command such as glBegin(GL_POLYGONS)…
heh, thanks for the reply, i actually figured out my own question. If you are using the GL_POLYGONS and associate them with vertices to follow, you can change the glPolygonMode from GL_FILL to GL_LINE which will give you a wireframe mode. Default is GL_FILL
Sure, just remember you have to redraw the object to make the change happen.
example:
if (wire_world) glPolygonMode( GL_LINE );
if (!wire_world) glPolygonMode( GL_FILL );
Draw_stuff();
Originally posted by tzano:
heh, thanks for the reply, i actually figured out my own question. If you are using the GL_POLYGONS and associate them with vertices to follow, you can change the glPolygonMode from GL_FILL to GL_LINE which will give you a wireframe mode. Default is GL_FILL