glLineWidth();

Hi,

I’m new to JOGL and I just wanted to know how do you use the glLineWidth method to help fatten and draw lines?

Can someone explain to me what it is for, what it does, and how it is used in code?

I’m trying to draw a house figure using the glLineWidth method and I need an idea where to start.

Thanks

After you set the line width, all lines drawn will use that width. So something like:

glLineWidth(5f);// fat lines
glBegin(GL_LINES);
{
glColor3f(1f,1f,1f);
glVertex2f(x1, y1);
glVertex2f(x2, y2);
}
glEnd();

etc. etc. You might find the red book handy: http://www.gamedev.net/reference/count.asp?LinkID=993

Note that not all cards support the same variety of line widths, so for one card you might ahve a line width that looks completely different from another. Check to see what your max line width is before trying to set it.

Cheers