Class: Vulkan::WindowSurface

Inherits:
Surface
  • Object
show all
Defined in:
lib/vulkan/window_surface.rb

Overview

Provides a handle to an underlying window surface based on an SDL2 window (or otherwise, any object which responds to ‘vk_create_surface` and which returns the integer address of the created surface), and a Vulkan instance.

Instance Method Summary collapse

Methods included from Finalizer

#finalize_with, #hexaddr, included, #to_ptr

Constructor Details

#initialize(instance, window) ⇒ WindowSurface

Returns a new instance of WindowSurface.



9
10
11
# File 'lib/vulkan/window_surface.rb', line 9

def initialize(instance, window)
  super(instance, window.vk_create_surface(instance.to_ptr.to_i))
end