开发者

Drawing a circle in openGL for android

开发者 https://www.devze.com 2023-03-23 18:51 出处:网络
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.

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.

Drawing a circle in openGL for android

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

0

精彩评论

暂无评论...
验证码 换一张
取 消