I have successfully drawn a helix with the GL_LINE_STRIP. Now I'm wondering if it is possible to make the line thicker somehow. Google searches made me realize 2 choices. I can make triangles to make quad... Or just somehow use glLineWitdh? I just want the simplest way to do it, so it supports the next Im going to do. Which is to color specific line segments.
Using OpenGL ES 2.0
glLineWidth() is obviously easier if it meets your needs. There's one big caveat in ES 2.0, though: The maximum width supported by a specific device can be as low as 1.0. Which means that devices can be ES 2.0 compliant without supporting wide lines at all.
You can get the range of supported line widths with:
GLfloat lineWidthRange[2];
glGetFloatv(GL_ALIASED_LINE_WIDTH_RANGE, lineWidthRange);
lineWidthRange[1] will then be the maximum supported line width. Based on table 6.18 of the spec, the minimum allowed value for this limit is 1.
Based on this, drawing geometry (triangles) that give actual width to your lines is the only approach that is guaranteed to work across devices.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With