Drawing a circle in openGL for android
So I'd like to be able to draw a circle where I can specify the amount of circle drawn as shown in the following diagram.
AS an opengl newbie I'm not really sure how to approach this.. I've previously drawn full circles using GL_TRIANGLE开发者_StackOverflow中文版_FAN
You already know how to draw a circle using a triangle fan. Now you just have to calculate the angles of the cutoff corners, use those as the beginning and end of the arc and place the hub of the triangle fan at the middle of the cutoff edge.
you could use a glScissor test to cut off the parts of the circle that you don't want. http://www.khronos.org/opengles/sdk/1.1/docs/man/glScissor.xml
精彩评论