#bug fix etc1 alpha builtin support Sprite (#16278)

see: https://github.com/cocos2d/cocos2d-x/pull/16118
This commit is contained in:
halx99 2016-07-31 22:30:03 +08:00 committed by minggo
parent a82e52ffd6
commit 9cca6eb685
1 changed files with 1 additions and 1 deletions

View File

@ -365,7 +365,7 @@ void Sprite::setTexture(const std::string &filename)
void Sprite::setTexture(Texture2D *texture)
{
setGLProgramState(GLProgramState::getOrCreateWithGLProgramName(GLProgram::SHADER_NAME_POSITION_TEXTURE_COLOR_NO_MVP));
setGLProgramState(GLProgramState::getOrCreateWithGLProgramName(GLProgram::SHADER_NAME_POSITION_TEXTURE_COLOR_NO_MVP, texture));
// If batchnode, then texture id should be the same
CCASSERT(! _batchNode || (texture && texture->getName() == _batchNode->getTexture()->getName()), "CCSprite: Batched sprites should use the same texture as the batchnode");