1

I am trying to add texture in polygon shape. I got struck with the below code. I am not getting the texture of entire shape.

I need apply texture entire shapes repeatedly. i am also trying the "GL_REPEAT" in ccTexParams. but it is not supported in NPOT images.

Can you find any issues on the below code?.

tongue = CCTextureCache::sharedTextureCache()->addImage("Icon-72.png");
ccTexParams params = {GL_LINEAR,GL_LINEAR,GL_CLAMP_TO_EDGE,GL_CLAMP_TO_EDGE};
tongue->setTexParameters(&params);
tongue->retain();
cocos2d::CCSprite* sprite = cocos2d::CCSprite::createWithTexture(tongue);
this->addChild(sprite);
Vanarajan
  • 539
  • 1
  • 4
  • 19
  • don't see any code to draw your texture. user data is just a void pointer that you can access later. – Morion Sep 18 '13 at 10:41

0 Answers0