could a CCRenderTexture object change its displayFrame?

I use this to change the sprite of ccrenderTexture, but seems doesn’t work

rt->setSprite(CCSprite::spriteWithFile("CloseSelected.png"));
(rt is a CCRenderTexture pointer)

then what’s the right way to operate the inner sprite node of renderTexture?

btw, i need a radiance on a scene like this,
http://s3.sinaimg.cn/middle/5be44a8fxaa363632ed22&690
i need the radiance move with my finger when touch is moved, is there any way to archieve this?
thank your help in advance~~


QQ截图20120808212024.png (69.9 KB)

Sorry, I don’t know what’s your meaning.
You can draw what you want into a render texture.

Minggo Zhang wrote:

Sorry, I don’t know what’s your meaning.
You can draw what you want into a render texture.

i know i can use sprite->visit to draw an image to render texture…
My questions are:

  1. what on earth is setSprite & getSprite used for ? why “rt->setSprite(CCSprite::spriteWithFile(”CloseSelected.png“));” doesn’t work? or shouldn’t it works like setDisplayFrame(…)?

  2. is there a way to dynamically draw a sprite on the render Texture? i want to have a ‘light spot’ follow my finger when touch moved