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