import vulkan
, vkTypes

proc create_vulkan_semaphores*( vulkan_device: VkDevice 
                              , the_present_semaphores: var array[2, VkSemaphore]
                              , the_render_semaphores: var array[2, VkSemaphore]
                              ) = 
 var 
  semaphore_create_info = VkSemaphoreCreateInfo( sType: VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO
                                              , pNext: nil
                                              )

 for i in 0..1:
  discard vkCreateSemaphore( vulkan_device
                           , addr semaphore_create_info
                           , nil
                           , addr the_present_semaphores[i]
                           )

  discard vkCreateSemaphore( vulkan_device
                           , addr semaphore_create_info
                           , nil
                           , addr the_render_semaphores[i]
                           )