mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-10 17:18:44 +08:00
Merge branch '3.6' into 3.7-beta
This commit is contained in:
commit
162f5a4270
@ -269,6 +269,11 @@ void SkeletonTwoColorBatch::batch (TwoColorTrianglesCommand* command) {
|
||||
flush(_lastCommand);
|
||||
}
|
||||
|
||||
uint32_t materialID = command->getMaterialID();
|
||||
if (_lastCommand && _lastCommand->getMaterialID() != materialID) {
|
||||
flush(_lastCommand);
|
||||
}
|
||||
|
||||
memcpy(_vertexBuffer + _numVerticesBuffer, command->getTriangles().verts, sizeof(V3F_C4B_C4B_T2F) * command->getTriangles().vertCount);
|
||||
const Mat4& modelView = command->getModelView();
|
||||
for (int i = _numVerticesBuffer; i < _numVerticesBuffer + command->getTriangles().vertCount; i++) {
|
||||
@ -284,10 +289,8 @@ void SkeletonTwoColorBatch::batch (TwoColorTrianglesCommand* command) {
|
||||
_numVerticesBuffer += command->getTriangles().vertCount;
|
||||
_numIndicesBuffer += command->getTriangles().indexCount;
|
||||
|
||||
uint32_t materialID = command->getMaterialID();
|
||||
|
||||
if ((_lastCommand && _lastCommand->getMaterialID() != materialID) || command->isForceFlush()) {
|
||||
flush(_lastCommand);
|
||||
if (command->isForceFlush()) {
|
||||
flush(command);
|
||||
}
|
||||
_lastCommand = command;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user