forked from Dynamitos/Seele
overhauled physics engine
This commit is contained in:
1 parent
3c7346cf7b
commit
2208ab438a
164 files changed
+22606
-928
No files matched your search
@@ -56,10 +56,18 @@ void MeshProcessor::buildMeshDrawCommand(
|
||||
drawCommand->bindPipeline(pipeline);
|
||||
drawCommand->bindVertexBuffer(vertexStreams);
|
||||
drawCommand->bindDescriptor(descriptors);
|
||||
for(auto element : meshBatch.elements)
|
||||
for(const auto& element : meshBatch.elements)
|
||||
{
|
||||
drawCommand->bindIndexBuffer(element.indexBuffer);
|
||||
drawCommand->draw(element);
|
||||
drawCommand->pushConstants(pipelineLayout, Gfx::SE_SHADER_STAGE_VERTEX_BIT | Gfx::SE_SHADER_STAGE_FRAGMENT_BIT, 0, sizeof(uint32), &element.sceneDataIndex);
|
||||
if(element.indexBuffer != nullptr)
|
||||
{
|
||||
drawCommand->bindIndexBuffer(element.indexBuffer);
|
||||
drawCommand->draw(element);
|
||||
}
|
||||
else
|
||||
{
|
||||
drawCommand->draw(vertexStreams[0].vertexBuffer->getNumVertices(), 1, 0, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user