view semicongine/vulkan/platform/wayland.nim @ 381:bba0e9c881d1

did: package restructuring according to nimble recommendation for libraries
author Sam <sam@basx.dev>
date Sat, 02 Dec 2023 22:23:29 +0700
parents src/semicongine/vulkan/platform/wayland.nim@5e19aead2b61
children e76822e943af
line wrap: on
line source

type
  VkWaylandSurfaceCreateInfoKHR* = object
    sType*: VkStructureType
    pNext*: pointer
    flags*: VkWaylandSurfaceCreateFlagsKHR
    display*: ptr wl_display
    surface*: ptr wl_surface
  wl_display *{.header: "wayland-client.h".} = object
  wl_surface *{.header: "wayland-client.h".} = object
# extension VK_KHR_wayland_surface
var
  vkCreateWaylandSurfaceKHR*: proc(instance: VkInstance, pCreateInfo: ptr VkWaylandSurfaceCreateInfoKHR, pAllocator: ptr VkAllocationCallbacks, pSurface: ptr VkSurfaceKHR): VkResult {.stdcall.}
  vkGetPhysicalDeviceWaylandPresentationSupportKHR*: proc(physicalDevice: VkPhysicalDevice, queueFamilyIndex: uint32, display: ptr wl_display): VkBool32 {.stdcall.}
proc loadVK_KHR_wayland_surface*(instance: VkInstance) =
  loadVK_KHR_surface(instance)
  vkCreateWaylandSurfaceKHR = cast[proc(instance: VkInstance, pCreateInfo: ptr VkWaylandSurfaceCreateInfoKHR, pAllocator: ptr VkAllocationCallbacks, pSurface: ptr VkSurfaceKHR): VkResult {.stdcall.}](vkGetInstanceProcAddr(instance, "vkCreateWaylandSurfaceKHR"))
  vkGetPhysicalDeviceWaylandPresentationSupportKHR = cast[proc(physicalDevice: VkPhysicalDevice, queueFamilyIndex: uint32, display: ptr wl_display): VkBool32 {.stdcall.}](vkGetInstanceProcAddr(instance, "vkGetPhysicalDeviceWaylandPresentationSupportKHR"))