OpenGL Line Width
问题 In my OpenGL app, it won't let me draw a line greater then ten pixels wide. Is there a way to make it draw more than ten pixels? void OGL_Renderer::drawLine(int x, int y, int x2, int y2, int r, int g, int b, int a, int line_width) { glColor4ub(r, g, b, a); glLineWidth((GLfloat)line_width); glBegin(GL_LINES); glVertex2i(x, y); glVertex2i(x2, y2); glEnd(); glLineWidth(1.0f); } 回答1: You could try drawing a quad. Make it as wide as you want your line to be long, and tall as the line width you