cocos2dx - Custom Fragment Shader and CCRenderTexture
- by saiy2k
I have a CCRenderTexture that is filled with a sprite when the scene is loaded, as follows,
canvas = CCRenderTexture::create(this->getContentSize().width, this->getContentSize().height);
canvas->setPosition(data->position);
canvas->beginWithClear(0.0, 0.0, 0.0, 0);
this->visit();
canvas->end();
The above code is written…