VKDevice增加注释和排版
This commit is contained in:
parent
54367eb700
commit
90826198a7
@ -130,11 +130,11 @@ public: //Command Buffer 相关
|
|||||||
|
|
||||||
public: //提交相关
|
public: //提交相关
|
||||||
|
|
||||||
bool AcquireNextImage ();
|
bool Wait (bool wait_all=VK_TRUE,uint64_t time_out=HGL_NANO_SEC_PER_SEC*0.1); ///<等待队列完成
|
||||||
bool SubmitDraw (const VkCommandBuffer *,const uint32_t count=1);
|
bool AcquireNextImage (); ///<请求切换到下一帧(注意此函数调用并不代表画面会出现)
|
||||||
bool SubmitTexture (const VkCommandBuffer *cmd_bufs,const uint32_t count=1);
|
bool SubmitDraw (const VkCommandBuffer *,const uint32_t count=1); ///<提交绘制指令
|
||||||
bool Wait (bool wait_all=VK_TRUE,uint64_t time_out=HGL_NANO_SEC_PER_SEC*0.1);
|
bool SubmitTexture (const VkCommandBuffer *cmd_bufs,const uint32_t count=1); ///<提交纹理处理到队列
|
||||||
bool QueuePresent ();
|
bool QueuePresent (); ///<等待队列完成,并将画面呈现出来
|
||||||
};//class Device
|
};//class Device
|
||||||
VK_NAMESPACE_END
|
VK_NAMESPACE_END
|
||||||
#endif//HGL_GRAPH_RENDER_SURFACE_INCLUDE
|
#endif//HGL_GRAPH_RENDER_SURFACE_INCLUDE
|
||||||
|
@ -40,10 +40,10 @@ Device::Device(DeviceAttribute *da)
|
|||||||
|
|
||||||
present_info.sType = VK_STRUCTURE_TYPE_PRESENT_INFO_KHR;
|
present_info.sType = VK_STRUCTURE_TYPE_PRESENT_INFO_KHR;
|
||||||
present_info.pNext = nullptr;
|
present_info.pNext = nullptr;
|
||||||
present_info.swapchainCount = 1;
|
|
||||||
present_info.pResults = nullptr;
|
|
||||||
present_info.waitSemaphoreCount = 1;
|
present_info.waitSemaphoreCount = 1;
|
||||||
present_info.pWaitSemaphores = *render_complete_semaphore;
|
present_info.pWaitSemaphores = *render_complete_semaphore;
|
||||||
|
present_info.swapchainCount = 1;
|
||||||
|
present_info.pResults = nullptr;
|
||||||
|
|
||||||
RecreateDevice();
|
RecreateDevice();
|
||||||
}
|
}
|
||||||
@ -104,12 +104,12 @@ CommandBuffer *Device::CreateCommandBuffer()
|
|||||||
if(!attr->cmd_pool)
|
if(!attr->cmd_pool)
|
||||||
return(nullptr);
|
return(nullptr);
|
||||||
|
|
||||||
VkCommandBufferAllocateInfo cmd={};
|
VkCommandBufferAllocateInfo cmd;
|
||||||
cmd.sType=VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO;
|
cmd.sType =VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO;
|
||||||
cmd.pNext=nullptr;
|
cmd.pNext =nullptr;
|
||||||
cmd.commandPool=attr->cmd_pool;
|
cmd.commandPool =attr->cmd_pool;
|
||||||
cmd.level=VK_COMMAND_BUFFER_LEVEL_PRIMARY;
|
cmd.level =VK_COMMAND_BUFFER_LEVEL_PRIMARY;
|
||||||
cmd.commandBufferCount=1;
|
cmd.commandBufferCount =1;
|
||||||
|
|
||||||
VkCommandBuffer cmd_buf;
|
VkCommandBuffer cmd_buf;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user