//先给桌面添加颜色背景
auto cly = LayerColor::create(Color4B(120, 230, 0, 120), vSize.width, vSize.height);
addChild(cly);
//在桌面上创建两个循环运动的物体,然后看看render怎么用
auto sp1 = Sprite::create("a.png");
sp1->setAnchorPoint(Vec2(5, 0.5));
/* Create the render texture */
auto renderTexture = RenderTexture::create(vSize.width, vSize.height, Texture2D::PixelFormat::RGBA4444);
renderTexture->setPosition(Vec2(vSize.width / 2, vSize.height / 2));
// renderTexture->setScale(2.0f);
/* add the sprites to the render texture */
renderTexture->addChild(sp1);
//renderTexture->setClearColor(Color4F(0, 0, 0, 0));
renderTexture->setClearColor(Color4F(CCRANDOM_0_1(), CCRANDOM_0_1(), CCRANDOM_0_1(), 1));
/* add the render texture to the scene */
addChild(renderTexture);
renderTexture->setAutoDraw(true);
auto seqAction = RotateBy::create(2, 360);//RotateBy::create(2, Vec3(360,360,0));
sp1->runAction(RepeatForever::create(seqAction));