Class: Vulkan::Framebuffer
- Inherits:
-
Object
- Object
- Vulkan::Framebuffer
- Includes:
- Checks, Conversions, Finalizer
- Defined in:
- lib/vulkan/framebuffer.rb
Constant Summary
Constants included from Conversions
Conversions::ACCESS_MASK_BITS, Conversions::BORDER_COLORS, Conversions::BUFFER_USAGE_BITS, Conversions::COMPARE_OPS, Conversions::DEPENDENCY_FLAG_BITS, Conversions::DESCRIPTOR_TYPES, Conversions::DYNAMIC_STATES, Conversions::FILTERS, Conversions::FORMAT_FEATURE_BITS, Conversions::IMAGE_ASPECT_BITS, Conversions::IMAGE_CREATE_BITS, Conversions::IMAGE_FORMATS, Conversions::IMAGE_TILING, Conversions::IMAGE_TYPES, Conversions::IMAGE_USAGE_BITS, Conversions::MEMORY_PROPERTIES, Conversions::PIPELINE_STAGE_BITS, Conversions::PRESENT_MODES, Conversions::SAMPLER_ADDRESS_MODES, Conversions::SAMPLER_MIPMAP_MODES, Conversions::SHADER_STAGE_BITS, Conversions::SHARING_MODES, Conversions::SURFACE_TRANSFORMS, Conversions::VERTEX_INPUT_RATES
Instance Attribute Summary collapse
-
#height ⇒ Object
readonly
Returns the value of attribute height.
-
#layers ⇒ Object
readonly
Returns the value of attribute layers.
-
#width ⇒ Object
readonly
Returns the value of attribute width.
Instance Method Summary collapse
-
#initialize(vk, attachments:, width:, height:, render_pass:, layers: 1) ⇒ Framebuffer
constructor
A new instance of Framebuffer.
- #to_ptr ⇒ Object
Methods included from Finalizer
#finalize_with, #hexaddr, included
Methods included from Conversions
#array_of_pointers, #array_of_structures, #array_of_uint32s, #bool_to_vk, #buffer_usage_flags_to_syms, #const_to_symbol, #cstr_to_rbstr, #flags_to_symbols, #flags_to_syms, #num_to_samples, #present_mode_to_sym, #queue_family_to_index, #struct_to_hash, #sym_to_blend_factor, #sym_to_blend_op, #sym_to_border_color, #sym_to_color_component_bit, #sym_to_command_buffer_level, #sym_to_command_buffer_usage, #sym_to_compare_op, #sym_to_cull_mode, #sym_to_descriptor_type, #sym_to_dynamic_state, #sym_to_filter, #sym_to_front_face, #sym_to_image_format, #sym_to_image_layout, #sym_to_image_tiling, #sym_to_image_type, #sym_to_index_type, #sym_to_load_op, #sym_to_pipeline_bind_point, #sym_to_polygon_mode, #sym_to_present_mode, #sym_to_sampler_address_mode, #sym_to_sampler_mipmap_mode, #sym_to_samples, #sym_to_sharing_mode, #sym_to_store_op, #sym_to_subpass_contents, #sym_to_topology, #sym_to_val, #sym_to_vertex_input_rate, #syms_to_access_mask, #syms_to_buffer_usage_flags, #syms_to_dependency_flags, #syms_to_descriptor_set_layout_type_flags, #syms_to_flags, #syms_to_format_feature_flags, #syms_to_image_aspect_flags, #syms_to_image_create_flags, #syms_to_image_usage_flags, #syms_to_memory_properties, #syms_to_pipeline_stage_flags, #syms_to_shader_stage_flags, #syms_to_surface_transforms, #vk_make_version, #vk_parse_version
Methods included from Checks
Constructor Details
#initialize(vk, attachments:, width:, height:, render_pass:, layers: 1) ⇒ Framebuffer
Returns a new instance of Framebuffer.
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/vulkan/framebuffer.rb', line 11 def initialize(vk, attachments:, width:, height:, render_pass:, layers: 1) @vk = vk @width = width @height = height @layers = layers = framebuffer_info = VkFramebufferCreateInfo.malloc framebuffer_info.sType = VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO framebuffer_info.renderPass = render_pass framebuffer_info. = .size framebuffer_info.pAttachments = array_of_pointers() framebuffer_info.width = width framebuffer_info.height = height framebuffer_info.layers = layers framebuffer_p = Vulkan.create_value("void *", nil) check_result @vk.vkCreateFramebuffer(vk.device, framebuffer_info, nil, framebuffer_p) @handle = framebuffer_p.value finalize_with vk, :vkDestroyFramebuffer, vk.device, @handle, nil end |
Instance Attribute Details
#height ⇒ Object (readonly)
Returns the value of attribute height.
8 9 10 |
# File 'lib/vulkan/framebuffer.rb', line 8 def height @height end |
#layers ⇒ Object (readonly)
Returns the value of attribute layers.
9 10 11 |
# File 'lib/vulkan/framebuffer.rb', line 9 def layers @layers end |
#width ⇒ Object (readonly)
Returns the value of attribute width.
7 8 9 |
# File 'lib/vulkan/framebuffer.rb', line 7 def width @width end |
Instance Method Details
#to_ptr ⇒ Object
33 34 35 |
# File 'lib/vulkan/framebuffer.rb', line 33 def to_ptr @handle end |