mirror of https://github.com/bjornbytes/lovr.git
Set index buffer at the right time;
Just a small ordering issue with previous commit.
This commit is contained in:
parent
6256acfc6d
commit
e3e930d6cc
|
@ -702,15 +702,15 @@ void lovrGraphicsFlush() {
|
|||
if (batch->type == BATCH_MESH) {
|
||||
lovrMeshSetAttributeEnabled(batch->draw.mesh, "lovrDrawID", batch->params.mesh.instances <= 1);
|
||||
} else {
|
||||
if (batch->draw.mesh == state.instancedMesh && batch->draw.instances <= 1) {
|
||||
batch->draw.mesh = state.mesh;
|
||||
}
|
||||
|
||||
if (batch->indexed) {
|
||||
lovrMeshSetIndexBuffer(batch->draw.mesh, state.buffers[STREAM_INDEX], bufferCount[STREAM_INDEX], sizeof(uint16_t), 0);
|
||||
} else {
|
||||
lovrMeshSetIndexBuffer(batch->draw.mesh, NULL, 0, 0, 0);
|
||||
}
|
||||
|
||||
if (batch->draw.mesh == state.instancedMesh && batch->draw.instances <= 1) {
|
||||
batch->draw.mesh = state.mesh;
|
||||
}
|
||||
}
|
||||
|
||||
lovrGpuDraw(&batch->draw);
|
||||
|
|
Loading…
Reference in New Issue