Class: Vulkan::Semaphore
- Inherits:
-
Object
- Object
- Vulkan::Semaphore
- Defined in:
- lib/vulkan/semaphore.rb
Instance Method Summary collapse
-
#initialize(vk) ⇒ Semaphore
constructor
A new instance of Semaphore.
Methods included from Finalizer
#finalize_with, #hexaddr, included, #to_ptr
Methods included from Checks
Constructor Details
#initialize(vk) ⇒ Semaphore
Returns a new instance of Semaphore.
6 7 8 9 10 11 12 13 14 |
# File 'lib/vulkan/semaphore.rb', line 6 def initialize(vk) @vk = vk semaphore_info = VkSemaphoreCreateInfo.malloc semaphore_info.sType = VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO sem_p = Vulkan.create_value('void *', nil) check_result @vk.vkCreateSemaphore(@vk.device, semaphore_info, nil, sem_p) @handle = sem_p.value finalize_with @vk, :vkDestroySemaphore, @vk.device, @handle, nil end |