PDA

View Full Version : Wireframe world



tzano
02-26-2004, 07:05 PM
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)...

nexusone
02-26-2004, 07:08 PM
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)...

tzano
02-26-2004, 07:20 PM
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

nexusone
02-27-2004, 03:50 AM
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