mirror of https://github.com/axmolengine/axmol.git
#bug fix etc1 alpha builtin support Sprite (#16278)
see: https://github.com/cocos2d/cocos2d-x/pull/16118
This commit is contained in:
parent
a82e52ffd6
commit
9cca6eb685
|
@ -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");
|
||||
|
|
Loading…
Reference in New Issue