Constant Line Width

i have four points connected with a line(constant width) when i move any of my points in X direction than width of my line varies between points, how can i keep my line width constant.

Aliased wide lines in OpenGL have strange width definition. Width is counted as either vertically or horizontally, so if your lines are not completely horizontal or vertical, you probably don’t get what you wanted.

Try enabling antialiasing. Multisample line rasterization has more sane rules.