I see, thanks!
I’ve messed around with it and with cc.drawingUtil and I’ve finally got them both to work, I had some minor misconceptions about the usage sintax. That said, I’m going to keep using the “old API” for now, as it seems more versatile and I definately need to draw some open polygons.
Since we are on that topic: are there plans to expand the drawing primitives to support a wider arrange of parameters, like the ones used for SVG drawings? (lines with different strokes, etc).
EDIT: Plus, I’ve just realized, “CCDrawNode.js” actually calls “cc.drawingUtil” in it’s code! So is it supposed to be another wrapper on top of the already existing drawing primitives? What’s the point?
EDIT 2 Edit Harder OK, I finally get it: cc.drawingUtil only works when used within (the scheduled draw function of a?) Sprite or any other type of node, while cc.DrawingNode is an element that has to be itself added to a layer and exposes the drawing functionality externally. So in my case, the right way to go is to use cc.drawingUtil since the polygons I want to draw are suppossed to be within a sprite, but I reckon the DrawingNode class may have it’s own right to exist.
That said, I think both approaches should use the same (or consistently named and functioning) methods. I can’t bear the thought of DrawingNode offering less (or inconsistent) functionality than drawingUtil (i.e. not being able to draw open polygons, the polygon drawing method having different parameters, not having a method for drawing rectangles, etc.).