glColor4f(0.0, 1.0, 0.0, 0.8);
glLineWidth(100.0);
ccDrawCircle(ccp(240,160), 70, 0, 360, NO);
For some reason, the circle's line being drawn definitely hasn't 100 width. That code is inside the draw method and all. Any ideas?
You’ve been asking for dark mode for years.
The dark mode beta is finally here.
Change your preferences any time.
glColor4f(0.0, 1.0, 0.0, 0.8);
glLineWidth(100.0);
ccDrawCircle(ccp(240,160), 70, 0, 360, NO);
For some reason, the circle's line being drawn definitely hasn't 100 width. That code is inside the draw method and all. Any ideas?
Two thoughts: first of all, your size might be bigger than the possible ranges for the value. I seem to recall reading that an Open GL ES implementation actually only needs to support a value of 1. I think the iPhone can support values other than 1, but 100 might be outside of its range.
You might also want to check if glLineSmooth is enabled and, if not, disable it. But I don't think that that is the issue here.
Try seeing what range the device supports for line widths:
GLint range[2];
glGetIntegerv(GL_ALIASED_LINE_WIDTH_RANGE, range);
glGetIntegerv(GL_SMOOTH_LINE_WIDTH_RANGE, range);
You are only guaranteed for 1.0 to be supported, but I do know that the iPhone supports at least 2.0 as well (I know a well-known game that uses 2.0 to render a line-drawn circle).
glGetIntegerv for the line parameters. As a sanity test, but sure to set smoothRange and aliased arrays to something known (like 0xdeadbabe) to see if glGetIntegerv is even modifying your array. Maybe it's not. In which case, it's broken/unsupported/etc.
– Jim Buck
May 13 '14 at 21:10
glError right before calling glGetIntegerv and then call glError again right afterward. Maybe there is some underlying error preventing it from giving you those values (but I honestly can't imagine what; it's just copying a value from some internal structure to your variables).
– Jim Buck
May 16 '14 at 0:56