|
@@ -114,10 +114,15 @@ namespace {
|
|
|
|
|
|
auto layout = programState->getVertexLayout();
|
|
auto layout = programState->getVertexLayout();
|
|
|
|
|
|
- layout->setAttribute("a_position", 0, backend::VertexFormat::FLOAT3, offsetof(spine::V3F_C4B_C4B_T2F, position), false);
|
|
|
|
- layout->setAttribute("a_color", 1, backend::VertexFormat::UBYTE4, offsetof(spine::V3F_C4B_C4B_T2F, color), true);
|
|
|
|
- layout->setAttribute("a_color2", 2, backend::VertexFormat::UBYTE4, offsetof(spine::V3F_C4B_C4B_T2F, color2), true);
|
|
|
|
- layout->setAttribute("a_texCoords", 3, backend::VertexFormat::FLOAT2, offsetof(spine::V3F_C4B_C4B_T2F, texCoords), false);
|
|
|
|
|
|
+ auto locPosition = programState->getAttributeLocation("a_position");
|
|
|
|
+ auto locTexcoord = programState->getAttributeLocation("a_texCoords");
|
|
|
|
+ auto locColor = programState->getAttributeLocation("a_color");
|
|
|
|
+ auto locColor2 = programState->getAttributeLocation("a_color2");
|
|
|
|
+
|
|
|
|
+ layout->setAttribute("a_position", locPosition, backend::VertexFormat::FLOAT3, offsetof(spine::V3F_C4B_C4B_T2F, position), false);
|
|
|
|
+ layout->setAttribute("a_color", locColor, backend::VertexFormat::UBYTE4, offsetof(spine::V3F_C4B_C4B_T2F, color), true);
|
|
|
|
+ layout->setAttribute("a_color2", locColor2, backend::VertexFormat::UBYTE4, offsetof(spine::V3F_C4B_C4B_T2F, color2), true);
|
|
|
|
+ layout->setAttribute("a_texCoords", locTexcoord, backend::VertexFormat::FLOAT2, offsetof(spine::V3F_C4B_C4B_T2F, texCoords), false);
|
|
layout->setLayout(sizeof(spine::V3F_C4B_C4B_T2F));
|
|
layout->setLayout(sizeof(spine::V3F_C4B_C4B_T2F));
|
|
|
|
|
|
__twoColorProgramState = std::shared_ptr<backend::ProgramState>(programState);
|
|
__twoColorProgramState = std::shared_ptr<backend::ProgramState>(programState);
|