Fixed main menu rendering after scene change #270
|
@ -51,6 +51,7 @@ namespace SHADE
|
|||
, referencedMatInstances { std::move(rhs.referencedMatInstances) }
|
||||
, matBufferDirty { std::move(rhs.matBufferDirty) }
|
||||
, subBatches { std::move(rhs.subBatches) }
|
||||
, isDirty { std::move(rhs.isDirty) }
|
||||
, drawData { std::move(rhs.drawData) }
|
||||
, transformData { std::move(rhs.transformData) }
|
||||
, instancedIntegerData { std::move(rhs.instancedIntegerData) }
|
||||
|
@ -82,6 +83,7 @@ namespace SHADE
|
|||
referencedMatInstances = std::move(rhs.referencedMatInstances);
|
||||
matBufferDirty = std::move(rhs.matBufferDirty) ;
|
||||
subBatches = std::move(rhs.subBatches) ;
|
||||
isDirty = std::move(rhs.isDirty) ;
|
||||
drawData = std::move(rhs.drawData) ;
|
||||
transformData = std::move(rhs.transformData) ;
|
||||
instancedIntegerData = std::move(rhs.instancedIntegerData) ;
|
||||
|
@ -438,14 +440,17 @@ namespace SHADE
|
|||
{
|
||||
// Create command
|
||||
const uint32_t CURR_INSTANCES = static_cast<uint32_t>(subBatch.Renderables.size());
|
||||
drawData.emplace_back(vk::DrawIndexedIndirectCommand
|
||||
{
|
||||
.indexCount = subBatch.Mesh->IndexCount,
|
||||
.instanceCount = CURR_INSTANCES,
|
||||
.firstIndex = subBatch.Mesh->FirstIndex,
|
||||
.vertexOffset = subBatch.Mesh->FirstVertex,
|
||||
.firstInstance = nextInstanceIndex
|
||||
});
|
||||
if (CURR_INSTANCES > 0)
|
||||
{
|
||||
drawData.emplace_back(vk::DrawIndexedIndirectCommand
|
||||
{
|
||||
.indexCount = subBatch.Mesh->IndexCount,
|
||||
.instanceCount = CURR_INSTANCES,
|
||||
.firstIndex = subBatch.Mesh->FirstIndex,
|
||||
.vertexOffset = subBatch.Mesh->FirstVertex,
|
||||
.firstInstance = nextInstanceIndex
|
||||
});
|
||||
}
|
||||
nextInstanceIndex += CURR_INSTANCES;
|
||||
|
||||
// Fill in buffers (CPU)
|
||||
|
|
Loading…
Reference in New Issue