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 corr
OpenGL implementations are not required to support rendering of wide lines.
You can query the range of supported line widths with:
GLfloat lineWidthRange[2] = {0.0f, 0.0f};
glGetFloatv(GL_ALIASED_LINE_WIDTH_RANGE, lineWidthRange);
// Maximum supported line width is in lineWidthRange[1].
The required minimum for both limits is 1.0, meaning that support for line widths larger than 1.0 is not required. Also, drawing wide lines is a deprecated feature, and will not be supported anymore if you move to a newer (core profile) version of OpenGL.
An alternative to drawing wide lines is to render thin polygons instead.