Class: Vulkan::QueueFamily
- Inherits:
-
Hash
- Object
- Hash
- Vulkan::QueueFamily
- Includes:
- Checks
- Defined in:
- lib/vulkan/queue_family.rb
Instance Attribute Summary collapse
-
#physical_device ⇒ Object
readonly
Returns the value of attribute physical_device.
Instance Method Summary collapse
-
#initialize(instance, physical_device, family_index) ⇒ QueueFamily
constructor
A new instance of QueueFamily.
- #supports?(feature) ⇒ Boolean
- #supports_presentation?(surface) ⇒ Boolean
Methods included from Checks
Constructor Details
#initialize(instance, physical_device, family_index) ⇒ QueueFamily
Returns a new instance of QueueFamily.
7 8 9 10 11 12 |
# File 'lib/vulkan/queue_family.rb', line 7 def initialize(instance, physical_device, family_index) super() @physical_device = physical_device @vk = Vulkan[instance, nil] @family_index = family_index end |
Instance Attribute Details
#physical_device ⇒ Object (readonly)
Returns the value of attribute physical_device.
5 6 7 |
# File 'lib/vulkan/queue_family.rb', line 5 def physical_device @physical_device end |
Instance Method Details
#supports?(feature) ⇒ Boolean
14 15 16 |
# File 'lib/vulkan/queue_family.rb', line 14 def supports?(feature) self[:supports].include?(feature) end |
#supports_presentation?(surface) ⇒ Boolean
18 19 20 21 22 23 24 25 |
# File 'lib/vulkan/queue_family.rb', line 18 def supports_presentation?(surface) supported_p = Vulkan.create_value('VkBool32', 0) check_result @vk.vkGetPhysicalDeviceSurfaceSupportKHR(@physical_device.to_ptr, @family_index, surface.to_ptr, supported_p) return supported_p.value == VK_TRUE end |