Fix merge error.

This commit is contained in:
halx99 2019-11-20 18:35:48 +08:00
parent e647820c9c
commit 0caf671edd
2 changed files with 1 additions and 20 deletions

View File

@ -114,23 +114,6 @@ bool SpriteBatchNode::initWithTexture(Texture2D *tex, ssize_t capacity/* = DEFAU
return true;
}
void SpriteBatchNode::setProgramState(backend::ProgramState* programState)
{
auto& pipelineDescriptor = _quadCommand.getPipelineDescriptor();
if (_programState != programState)
{
CC_SAFE_RELEASE(_programState);
_programState = programState;
CC_SAFE_RETAIN(programState);
}
pipelineDescriptor.programState = _programState;
CC_SAFE_RELEASE(program);
setVertexLayout();
setUniformLocation();
}
void SpriteBatchNode::setUniformLocation()
{
CCASSERT(_programState, "programState should not be nullptr");
@ -717,7 +700,7 @@ Texture2D* SpriteBatchNode::getTexture() const
void SpriteBatchNode::setTexture(Texture2D *texture)
{
_textureAtlas->setTexture(texture);
setProgramStateWithRegistry(backend::ProgramType::POSITION_TEXTURE_COLOR, texture);
updateProgramStateTexture(texture);
updateBlendFunc();
}

View File

@ -266,8 +266,6 @@ protected:
void updateBlendFunc();
void setVertexLayout();
void setUniformLocation();
void setProgramState(backend::ProgramState* programState) override;
TextureAtlas *_textureAtlas = nullptr;
BlendFunc _blendFunc;