Changes to command ownership

This commit is contained in:
Dynamitos
2024-04-10 10:23:06 +02:00
parent 2a7643ddf3
commit b830fd378c
13 changed files with 216 additions and 200 deletions
+2 -2
View File
@@ -42,13 +42,13 @@ void UIPass::beginFrame(const Component::Camera& cam)
void UIPass::render()
{
graphics->beginRenderPass(renderPass);
Gfx::PRenderCommand command = graphics->createRenderCommand("UIPassCommand");
Gfx::ORenderCommand command = graphics->createRenderCommand("UIPassCommand");
command->setViewport(viewport);
command->bindPipeline(pipeline);
command->bindVertexBuffer({elementBuffer});
command->bindDescriptor(descriptorSet);
command->draw(4, static_cast<uint32>(renderElements.size()), 0, 0);
graphics->executeCommands(Array<Gfx::PRenderCommand>({command}));
graphics->executeCommands(Array{std::move(command)});
graphics->endRenderPass();
//co_return;