Recently in my game, I want to render the whole scene to the render texture and blur it as the background.
The following code does not work, I get a blank image. “self” here is the instance of Scene in LUA
rt:begin()
self:visit()
rt:endToLua()
I have trid to use “self:render(cc.Director:getInstance():getRenderer())” to replace “self:visit()”. But “getRenderer()” is not exported to LUA. I also have tried to use “cc.Director:getInstance():drawScene()”, it still not work!
If I call “visit” of the children of the Scene, everything seems correct but the Camera is not specified.
So, how to render the whole scene to the RenderTexture with more than one Camera? Thanks.