Fixed validation error caused by deleting empty batches

This commit is contained in:
Kah Wei 2022-11-16 19:23:26 +08:00
parent f0c09817ce
commit c5bca4111b
2 changed files with 4 additions and 4 deletions

View File

@ -122,7 +122,7 @@ namespace SHADE
std::unique_ptr<char> matPropsData; std::unique_ptr<char> matPropsData;
Byte matPropsDataSize = 0; Byte matPropsDataSize = 0;
Byte singleMatPropAlignedSize = 0; Byte singleMatPropAlignedSize = 0;
Byte singleMatPropSize = 0; Byte singleMatPropSize = 0;
bool isCPUBuffersDirty = true; bool isCPUBuffersDirty = true;
// GPU Buffers // GPU Buffers
TripleBuffer drawDataBuffer; TripleBuffer drawDataBuffer;

View File

@ -69,9 +69,9 @@ namespace SHADE
batch->Remove(renderable); batch->Remove(renderable);
// If batch is empty, remove batch // TODO: If the pipeline is unloaded, we remove the batch
if (batch->IsEmpty()) /*if (batch->IsEmpty() && !batch->GetPipeline())
batches.erase(batch); batches.erase(batch);*/
} }
void SHSuperBatch::Clear() noexcept void SHSuperBatch::Clear() noexcept