| 770 | } |
| 771 | |
| 772 | void ShaderMultiTexture::changeTexture(Object*) |
| 773 | { |
| 774 | static const int textureFilesCount = 3; |
| 775 | static const std::string textureFiles[textureFilesCount] = {"Images/grossini.png", "Images/grossinis_sister1.png", |
| 776 | "Images/grossinis_sister2.png"}; |
| 777 | auto texture = |
| 778 | Director::getInstance()->getTextureCache()->addImage(textureFiles[_changedTextureId++ % textureFilesCount]); |
| 779 | Sprite* right = dynamic_cast<Sprite*>(getChildByTag(rightSpriteTag)); |
| 780 | right->setTexture(texture); |
| 781 | auto programState = _sprite->getProgramState(); |
| 782 | SET_TEXTURE(programState, "u_tex1", 1, right->getTexture()->getBackendTexture()); |
| 783 | } |
nothing calls this directly
no test coverage detected