Don't submit empty lists

This commit is contained in:
Luke Benstead 2022-08-24 20:31:55 +01:00
parent 9b9db31f30
commit c793e1f35d

View File

@ -92,17 +92,23 @@ void APIENTRY glKosSwapBuffers() {
TRACE(); TRACE();
SceneBegin(); SceneBegin();
SceneListBegin(GPU_LIST_OP_POLY); if(OP_LIST.vector.size > 2) {
SceneListSubmit(OP_LIST.vector.data, OP_LIST.vector.size); SceneListBegin(GPU_LIST_OP_POLY);
SceneListFinish(); SceneListSubmit(OP_LIST.vector.data, OP_LIST.vector.size);
SceneListFinish();
}
SceneListBegin(GPU_LIST_PT_POLY); if(PT_LIST.vector.size > 2) {
SceneListSubmit(PT_LIST.vector.data, PT_LIST.vector.size); SceneListBegin(GPU_LIST_PT_POLY);
SceneListFinish(); SceneListSubmit(PT_LIST.vector.data, PT_LIST.vector.size);
SceneListFinish();
}
SceneListBegin(GPU_LIST_TR_POLY); if(TR_LIST.vector.size > 2) {
SceneListSubmit(TR_LIST.vector.data, TR_LIST.vector.size); SceneListBegin(GPU_LIST_TR_POLY);
SceneListFinish(); SceneListSubmit(TR_LIST.vector.data, TR_LIST.vector.size);
SceneListFinish();
}
SceneFinish(); SceneFinish();
aligned_vector_clear(&OP_LIST.vector); aligned_vector_clear(&OP_LIST.vector);