diff --git a/extensions/spine/SkeletonBatch.cpp b/extensions/spine/SkeletonBatch.cpp index 08637538c5..637a91f665 100644 --- a/extensions/spine/SkeletonBatch.cpp +++ b/extensions/spine/SkeletonBatch.cpp @@ -96,17 +96,17 @@ backend::ProgramState* SkeletonBatch::updateCommandPipelinePS(SkeletonCommand* c currentState = programState->clone(); auto vertexLayout = currentState->getVertexLayout(); - auto locPosition = programState->getAttributeLocation(backend::ATTRIBUTE_NAME_POSITION); - auto locTexcoord = programState->getAttributeLocation(backend::ATTRIBUTE_NAME_TEXCOORD); - auto locColor = programState->getAttributeLocation(backend::ATTRIBUTE_NAME_COLOR); + auto locPosition = currentState->getAttributeLocation(backend::ATTRIBUTE_NAME_POSITION); + auto locTexcoord = currentState->getAttributeLocation(backend::ATTRIBUTE_NAME_TEXCOORD); + auto locColor = currentState->getAttributeLocation(backend::ATTRIBUTE_NAME_COLOR); vertexLayout->setAttribute(backend::ATTRIBUTE_NAME_POSITION, locPosition, backend::VertexFormat::FLOAT3, offsetof(V3F_C4B_T2F, vertices), false); vertexLayout->setAttribute(backend::ATTRIBUTE_NAME_COLOR, locColor, backend::VertexFormat::UBYTE4, offsetof(V3F_C4B_T2F, colors), true); vertexLayout->setAttribute(backend::ATTRIBUTE_NAME_TEXCOORD, locTexcoord, backend::VertexFormat::FLOAT2, offsetof(V3F_C4B_T2F, texCoords), false); vertexLayout->setLayout(sizeof(_vertices[0])); - command->_locMVP = programState->getUniformLocation(backend::UNIFORM_NAME_MVP_MATRIX); - command->_locTexture = programState->getUniformLocation(backend::UNIFORM_NAME_TEXTURE); + command->_locMVP = currentState->getUniformLocation(backend::UNIFORM_NAME_MVP_MATRIX); + command->_locTexture = currentState->getUniformLocation(backend::UNIFORM_NAME_TEXTURE); } return currentState; }