diff semiconginev2/rendering/vulkan/platform/wayland.nim @ 1218:56781cc0fc7c compiletime-tests

did: renamge main package
author sam <sam@basx.dev>
date Wed, 17 Jul 2024 21:01:37 +0700
parents semicongine/old/vulkan/platform/wayland.nim@a3eb305bcac2
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/semiconginev2/rendering/vulkan/platform/wayland.nim	Wed Jul 17 21:01:37 2024 +0700
@@ -0,0 +1,17 @@
+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"))