Cocos2D-X Fill Polygon with Texture

PRKit is an addition library to the cocos2d-x framework to easily fill polygons with texture.
PRKit efficiently triangulates the vertices with the provided triangulator.

PRKit provided by –
Triangulator provided by – John W. Ratcliff
Link to github


  • PRFilledPolygon extends CCNode and overrides the draw method
  • PRRatcliffTriangulator is the interface provided to triangulate vertices
  • triangulate c++ implementation of triangulation algorithm

Lets take look to some parts that concerns us. (Skip to usage if not intrested in details)
PRFilledPolygon overrides the draw method and provides 2 implementations. The first one is OpenGL ES 1.1 and the second OpenGL ES 2.


Recent Posts