Skip to content

Commit

Permalink
End clipping when calculating vx buffer size
Browse files Browse the repository at this point in the history
  • Loading branch information
Jhonnyg committed Sep 11, 2024
1 parent a9d0b3b commit 83596a7
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion defold-spine/commonsrc/vertices.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,9 @@ uint32_t CalcVertexBufferSize(const spSkeleton* skeleton, spSkeletonClipping* sk
}
spSkeletonClipping_clipEnd(skeleton_clipper, slot);
}

spSkeletonClipping_clipEnd2(skeleton_clipper);

if (out_max_triangle_count)
{
*out_max_triangle_count = max_triangle_count;
Expand Down Expand Up @@ -337,6 +340,7 @@ uint32_t GenerateVertexData(dmArray<SpineVertex>& vertex_buffer, const spSkeleto
}
else
{
spSkeletonClipping_clipEnd(skeleton_clipper, slot);
continue;
}

Expand Down Expand Up @@ -364,7 +368,7 @@ uint32_t GenerateVertexData(dmArray<SpineVertex>& vertex_buffer, const spSkeleto

if (draw_descs_out)
{
SpineDrawDesc desc;
SpineDrawDesc desc = {};
desc.m_VertexStart = batch_vindex_start;
desc.m_BlendMode = (uint32_t) slot->data->blendMode;
desc.m_VertexCount = vindex - batch_vindex_start;
Expand Down

0 comments on commit 83596a7

Please sign in to comment.