OpenGL ES - How to Draw a filled Polygon?

前端 未结 6 1495
小蘑菇
小蘑菇 2020-12-28 22:22

I tried googling and searching on stack but I didn\'t find anything :-(
( Mapping irregular shapes or other polygons (cartoons, sprites) to triangles in OpenGL ES )

6条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-28 23:12

    What is your final choice? I recently tested 5 of the libs listed in below link: http://vterrain.org/Implementation/Libs/triangulate.html

    But NONE of them is satisfying...

    1. iphone-glu: (http://code.google.com/p/iphone-glu/)

      • Bugs in the algorithm? there are tiny holes not filled, or sometimes draw outside of the polygon
    2. Triangulte: (http://www.flipcode.com/archives/Efficient_Polygon_Triangulation.shtml)

      • doesn't support holes…
    3. Triangulation: (http://www.cs.unc.edu/~dm/CODE/GEM/chapter.html)

      • Buggy, sometimes runs out of bounds, or negative index etc...
    4. poly2tri: (http://code.google.com/p/poly2tri/)

      • Buggy, crash in certain cases
    5. openglespolygon: (https://github.com/nroets/OpenGlEsPolygon)

      • imperfect algorithm? there are tiny holes (not filled) along the edges of the polygon

提交回复
热议问题