void VulkanRenderer::begin()
{
begin_semaphore = 0;
+ end_semaphore = 0;
}
void VulkanRenderer::begin(Semaphore &sem)
void VulkanRenderer::end()
{
- static_cast<Renderer *>(this)->commands.use_pipeline(0);
+ Renderer &self = *static_cast<Renderer *>(this);
+ self.commands.use_pipeline(0);
+ self.commands.submit_frame(begin_semaphore, end_semaphore);
}
void VulkanRenderer::end(Semaphore &sem)
{
- Renderer &self = *static_cast<Renderer *>(this);
- self.end();
- self.commands.submit_frame(begin_semaphore, &sem);
+ end_semaphore = &sem;
+ static_cast<Renderer *>(this)->end();
}
} // namespace GL