I wrote this function, where I set up line width to draw a rectangle, but when calling it, the line width doesn't change at all. How can i use glLineWidth
correctly?
void drawRect(Rectangle &rect)
{
double x1 = rect.min.x;
double y1 = rect.min.y;
double x2 = rect.max.x;
double y2 = rect.max.y;
glLineWidth(3.0f);
glBegin(GL_LINE_LOOP);
glVertex2d(x1, y1);
glVertex2d(x2, y1);
glVertex2d(x2, y2);
glVertex2d(x1, y2);
glEnd();
}