How to draw a line with Lua?

How to draw a line with Lua?
0.0 0


— filename: test.lua
cocos2d.ccDrawLine(createPoint(10, 10),createPoint(100, 100))

the run screen has no effect。

ccDrawLine is only a method,not return object or class,so in the lua script ,can’t use draw method。

help me!!!


ccDrawLine only call in CCNode:draw()


It seems to me that ccDrawLine is not exported for Lua, I’m missing something?


I found a way to add primitive rendering functions to CCRenderTexture, I’ll uploaded later on my Killa branch, however I only need points and lines but you’ll could extend the method if interested.