改进framework结构

This commit is contained in:
2019-06-15 23:52:10 +08:00
parent 6c8cf14abe
commit ddf0f3682d
5 changed files with 59 additions and 59 deletions

View File

@@ -188,23 +188,18 @@ public:
}
}
private:
void AcquireNextFrame()
{
device->AcquireNextImage();
}
public:
virtual void Draw()
{
device->AcquireNextImage();
device->Wait();
uint32_t index=device->GetCurrentFrameIndices();
VkCommandBuffer cb=*cmd_buf[index];
device->SubmitDraw(&cb);
device->Wait(&index);
device->QueuePresent();
}
@@ -213,10 +208,7 @@ public:
if(!win->Update())return(false);
if(win->IsVisible())
{
AcquireNextFrame();
Draw();
}
return(true);
}