setStateBlock implement

This commit is contained in:
yangxiao 2015-10-29 14:21:25 +08:00
parent a4d67867d7
commit 16d9cf1af9
1 changed files with 7 additions and 0 deletions

View File

@ -158,6 +158,13 @@ RenderState::StateBlock* RenderState::getStateBlock() const
return _state;
}
void RenderState::setStateBlock(RenderState::StateBlock* state)
{
CC_SAFE_RETAIN(state);
CC_SAFE_RELEASE(_state);
_state = state;
}
void RenderState::cloneInto(RenderState* renderState) const
{
CCASSERT(renderState, "must be non null");