opengl glLineWidth() doesn't change size of lines

后端 未结 1 332
一个人的身影
一个人的身影 2020-12-10 07:26

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

相关标签:
1条回答
  • 2020-12-10 07:53

    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.

    0 讨论(0)
提交回复
热议问题