Skip to content

Commit c0cf1c3

Browse files
committed
Tracking latest axmol
1 parent 5bcc882 commit c0cf1c3

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,4 @@ endif()
2121

2222
target_include_directories(${target_name} PUBLIC "runtime/include")
2323

24-
setup_cocos_extension_config(${target_name})
24+
setup_ax_extension_config(${target_name})

SkeletonBatch.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -98,10 +98,10 @@ backend::ProgramState* SkeletonBatch::updateCommandPipelinePS(SkeletonCommand* c
9898
auto locPosition = currentState->getAttributeLocation(backend::ATTRIBUTE_NAME_POSITION);
9999
auto locTexcoord = currentState->getAttributeLocation(backend::ATTRIBUTE_NAME_TEXCOORD);
100100
auto locColor = currentState->getAttributeLocation(backend::ATTRIBUTE_NAME_COLOR);
101-
vertexLayout->setAttribute(backend::ATTRIBUTE_NAME_POSITION, locPosition, backend::VertexFormat::FLOAT3, offsetof(V3F_C4B_T2F, vertices), false);
102-
vertexLayout->setAttribute(backend::ATTRIBUTE_NAME_TEXCOORD, locColor, backend::VertexFormat::UBYTE4, offsetof(V3F_C4B_T2F, colors), true);
103-
vertexLayout->setAttribute(backend::ATTRIBUTE_NAME_COLOR, locTexcoord, backend::VertexFormat::FLOAT2, offsetof(V3F_C4B_T2F, texCoords), false);
104-
vertexLayout->setLayout(sizeof(_vertices[0]));
101+
currentState->setVertexAttrib(backend::ATTRIBUTE_NAME_POSITION, locPosition, backend::VertexFormat::FLOAT3, offsetof(V3F_C4B_T2F, vertices), false);
102+
currentState->setVertexAttrib(backend::ATTRIBUTE_NAME_TEXCOORD, locColor, backend::VertexFormat::UBYTE4, offsetof(V3F_C4B_T2F, colors), true);
103+
currentState->setVertexAttrib(backend::ATTRIBUTE_NAME_COLOR, locTexcoord, backend::VertexFormat::FLOAT2, offsetof(V3F_C4B_T2F, texCoords), false);
104+
currentState->setVertexStride(sizeof(_vertices[0]));
105105

106106

107107
command->_locMVP = currentState->getUniformLocation(backend::UNIFORM_NAME_MVP_MATRIX);

SkeletonTwoColorBatch.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -108,11 +108,11 @@ namespace {
108108
auto locColor = programState->getAttributeLocation("a_color");
109109
auto locColor2 = programState->getAttributeLocation("a_color2");
110110

111-
layout->setAttribute("a_position", locPosition, backend::VertexFormat::FLOAT3, offsetof(spine::V3F_C4B_C4B_T2F, position), false);
112-
layout->setAttribute("a_color", locColor, backend::VertexFormat::UBYTE4, offsetof(spine::V3F_C4B_C4B_T2F, color), true);
113-
layout->setAttribute("a_color2", locColor2, backend::VertexFormat::UBYTE4, offsetof(spine::V3F_C4B_C4B_T2F, color2), true);
114-
layout->setAttribute("a_texCoords", locTexcoord, backend::VertexFormat::FLOAT2, offsetof(spine::V3F_C4B_C4B_T2F, texCoords), false);
115-
layout->setLayout(sizeof(spine::V3F_C4B_C4B_T2F));
111+
programState->setVertexAttrib("a_position", locPosition, backend::VertexFormat::FLOAT3, offsetof(spine::V3F_C4B_C4B_T2F, position), false);
112+
programState->setVertexAttrib("a_color", locColor, backend::VertexFormat::UBYTE4, offsetof(spine::V3F_C4B_C4B_T2F, color), true);
113+
programState->setVertexAttrib("a_color2", locColor2, backend::VertexFormat::UBYTE4, offsetof(spine::V3F_C4B_C4B_T2F, color2), true);
114+
programState->setVertexAttrib("a_texCoords", locTexcoord, backend::VertexFormat::FLOAT2, offsetof(spine::V3F_C4B_C4B_T2F, texCoords), false);
115+
programState->setVertexStride(sizeof(spine::V3F_C4B_C4B_T2F));
116116
}
117117

118118
static void initTwoColorProgramState() {

0 commit comments

Comments
 (0)