PDA

View Full Version : wireframes



09-18-2000, 09:42 AM
HI there, how do you do wireframes in openGL. I need a wireframe for 3d cube and triangle. The lines need to be 2 pixels wide. Can you help please.. i am useing glut.

thanx in advance

09-18-2000, 02:39 PM
To fo the wireframe part you need to call the glPolygonMode function. To do change the linewidth you need to call glLineWidth. Here is the code:
glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
glLineWidth(2.0);

Remember that these functions only need to be called once, so put them in your init function.