mirror of
https://github.com/nicbarker/clay.git
synced 2026-02-06 12:48:49 +00:00
Milestone reached: Main loop is working, but no UI is in place, that's the next goal
This commit is contained in:
parent
7f8a1128e3
commit
24d64f196f
2 changed files with 347 additions and 9 deletions
|
|
@ -179,8 +179,10 @@ static void ClayVulkan_DrawBorder(ClayVulkanRenderer* renderer, const Clay_Rende
|
|||
static void ClayVulkan_DrawImage(ClayVulkanRenderer* renderer, const Clay_RenderCommand* command, VkCommandBuffer commandBuffer)
|
||||
{
|
||||
ClayVulkanTexture* l_Texture = ClayVulkan_GetTexture(&renderer->m_ResourceCache, command->id);
|
||||
if (!l_Texture || !l_Texture->m_DescriptorSet) {
|
||||
return; // Caller must populate descriptor sets before rendering.
|
||||
if (!l_Texture || !l_Texture->m_DescriptorSet || !l_Texture->m_ImageView || !l_Texture->m_Sampler)
|
||||
{
|
||||
// Ensure descriptor sets are prepared before binding; application is responsible for keeping resources live.
|
||||
return;
|
||||
}
|
||||
vkCmdBindPipeline(commandBuffer, VK_PIPELINE_BIND_POINT_GRAPHICS, renderer->m_ImagePipeline);
|
||||
vkCmdBindDescriptorSets(commandBuffer, VK_PIPELINE_BIND_POINT_GRAPHICS, renderer->m_PipelineLayout, 0, 1, &l_Texture->m_DescriptorSet, 0, NULL);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue