Merge remote-tracking branch 'origin/main' into SP3-2-Physics
This commit is contained in:
commit
74a85180ac
|
@ -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,6 +440,8 @@ 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());
|
||||||
|
if (CURR_INSTANCES > 0)
|
||||||
|
{
|
||||||
drawData.emplace_back(vk::DrawIndexedIndirectCommand
|
drawData.emplace_back(vk::DrawIndexedIndirectCommand
|
||||||
{
|
{
|
||||||
.indexCount = subBatch.Mesh->IndexCount,
|
.indexCount = subBatch.Mesh->IndexCount,
|
||||||
|
@ -446,6 +450,7 @@ namespace SHADE
|
||||||
.vertexOffset = subBatch.Mesh->FirstVertex,
|
.vertexOffset = subBatch.Mesh->FirstVertex,
|
||||||
.firstInstance = nextInstanceIndex
|
.firstInstance = nextInstanceIndex
|
||||||
});
|
});
|
||||||
|
}
|
||||||
nextInstanceIndex += CURR_INSTANCES;
|
nextInstanceIndex += CURR_INSTANCES;
|
||||||
|
|
||||||
// Fill in buffers (CPU)
|
// Fill in buffers (CPU)
|
||||||
|
|
Loading…
Reference in New Issue