From 9cca6eb6857b0c31fb04555ff5cdd830a5bb24aa Mon Sep 17 00:00:00 2001 From: halx99 Date: Sun, 31 Jul 2016 22:30:03 +0800 Subject: [PATCH] #bug fix etc1 alpha builtin support Sprite (#16278) see: https://github.com/cocos2d/cocos2d-x/pull/16118 --- cocos/2d/CCSprite.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cocos/2d/CCSprite.cpp b/cocos/2d/CCSprite.cpp index 72dcde3e6e..643fd45c34 100644 --- a/cocos/2d/CCSprite.cpp +++ b/cocos/2d/CCSprite.cpp @@ -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");