I’m making a rectangle with:
glPolygonMode(GL_FRONT_AND_BACK,GL_LINE);
GL11.glBegin(GL_POLYGON);
//top line
glVertex2f(mX, mY);
glVertex2f(mX2, mY);
//right line
//glVertex2f(mX2, mY);
glVertex2f(mX2, mY2);
//bottom line
//glVertex2f(mX2, mY2);
glVertex2f(mX, mY2);
//left line
// glVertex2f(mX, mY2);
//glVertex2f(mX, mY);
glEnd();
My corners don’t act like proper connecting corners. If I have the shape on GL_FILL, the corners look totally right. If I have it on GL_LINE, the corners of the lines do not totally touch. They stop short of each other on the part that doesn’t overlap so that you have an effect looking sort of like: #. Like so:
.
Red is line, black is width. Even at line width 1f the lines do this.
How can I draw a rectangle with proper corners?