Method: Vulkan::Queue#initialize
- Defined in:
- lib/vulkan/queue.rb
#initialize(vk, handle, priority:, index:) ⇒ Queue
Returns a new instance of Queue.
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/vulkan/queue.rb', line 9 def initialize(vk, handle, priority:, index:) @vk = vk @handle = handle @priority = priority @index = index # pointers used and reused during queue submit and presentment, to avoid # unnecessary GC @wait_semaphores_buffers = { 0 => nil } @wait_stages_buffers = { 0 => nil } @signal_semaphores_buffers = { 0 => nil } @command_buffers_buffers = { 0 => nil } @submit_infos = { 0 => nil, 1 => Vulkan.struct("infos[1]" => VkSubmitInfo).malloc } @submit_infos[1].infos[0].sType = VK_STRUCTURE_TYPE_SUBMIT_INFO @image_indices_buffers = { 0 => nil } @swapchains_buffers = { 0 => nil } @present_info = VkPresentInfoKHR.malloc @present_info.sType = VK_STRUCTURE_TYPE_PRESENT_INFO_KHR end |