Skip to content

Commit a8f14c9

Browse files
committed
_currMiddlewareIbCount is correct ibCount for Spine
1 parent cb61d37 commit a8f14c9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

native/cocos/2d/renderer/Batcher2d.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -427,7 +427,7 @@ CC_FORCE_INLINE void Batcher2d::handleMiddlewareDraw(RenderEntity* entity, Rende
427427

428428
// check for merge draw
429429
auto enableBatch = !entity->getUseLocal();
430-
if (enableBatch && _currTexture == texture && _currMeshBuffer == meshBuffer && !_currEntity->getUseLocal() && material->getHash() == _currMaterial->getHash() && drawInfo->getIndexOffset() == _currDrawInfo->getIndexOffset() + _currDrawInfo->getIbCount() && layer == _currLayer) {
430+
if (enableBatch && _currTexture == texture && _currMeshBuffer == meshBuffer && !_currEntity->getUseLocal() && material->getHash() == _currMaterial->getHash() && drawInfo->getIndexOffset() == _currDrawInfo->getIndexOffset() + _currMiddlewareIbCount && layer == _currLayer) {
431431
_currMiddlewareIbCount += drawInfo->getIbCount();
432432
} else {
433433
generateBatch(_currEntity, _currDrawInfo);

0 commit comments

Comments
 (0)