You have different solutions, based on how you draw your circle. Currently, what you are doing is to divide
n segments and connect them together. Well, the first solution that comes to mind, is to change the range of the arc.

You have different solutions, based on how you draw your circle. Currently, what you are doing is to divide
n segments and connect them together. Well, the first solution that comes to mind, is to change the range of the arc.
For example, to make the arc only
3*PI/4, you can simply change your
float theta = 2.0f * PI * float(ii) / float(num_segments);
float theta = 3.0f * PI / 4.0f * float(ii) / float(num_segments);
Or more generally, if you consider the full circle to correspond to
1 and nothing to correspond to
0, you can make an arc which is
s times the circle (for example 3/8), then you can simply write:
float theta = 2.0f * PI * s * float(ii) / float(num_segments);
Note that, you may not want the arc to start at angle 0. Therefore, you can add a constant, which is the starting angle to this formula too:
float theta = 2.0f * PI * s * float(ii) / float(num_segments) + start;
Another solution would be to instead of computing angles within the arc, you get the start and end angles, and a step size. Then you have:
for (theta = start; theta < end; theta += step)
and make sure that in the end of your
GL_LINE_STRIP you do a
theta corresponding to
end angle to finish the arc correctly.
From your comments to the other answer, it seems possible that you are in fact looking for other curves such as bezier curves or splines or others.