I am new to cocos2d-x development. So any one tell me, how can i use CCTexture2D in cocos2Dx? So that i will use setTexture for CCSprite.
Thanks in advance.
you can create CCtexture2D by following line :
CCTexture2D *texture = CCTextureCache::sharedTextureCache()->addImage(pszFileName);
sprite -> setTexture(texture);
I think this may useful to you.