Mercurial > games > semicongine
diff semiconginev2/rendering/vulkan/platform/xlib.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/xlib.nim@a3eb305bcac2 |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/semiconginev2/rendering/vulkan/platform/xlib.nim Wed Jul 17 21:01:37 2024 +0700 @@ -0,0 +1,18 @@ +type + VkXlibSurfaceCreateInfoKHR* = object + sType*: VkStructureType + pNext*: pointer + flags*: VkXlibSurfaceCreateFlagsKHR + dpy*: ptr Display + window*: Window + Display *{.header: "X11/Xlib.h".} = object + VisualID *{.header: "X11/Xlib.h".} = object + Window *{.header: "X11/Xlib.h".} = object +# extension VK_KHR_xlib_surface +var + vkCreateXlibSurfaceKHR*: proc(instance: VkInstance, pCreateInfo: ptr VkXlibSurfaceCreateInfoKHR, pAllocator: ptr VkAllocationCallbacks, pSurface: ptr VkSurfaceKHR): VkResult {.stdcall.} + vkGetPhysicalDeviceXlibPresentationSupportKHR*: proc(physicalDevice: VkPhysicalDevice, queueFamilyIndex: uint32, dpy: ptr Display, visualID: VisualID): VkBool32 {.stdcall.} +proc loadVK_KHR_xlib_surface*(instance: VkInstance) = + loadVK_KHR_surface(instance) + vkCreateXlibSurfaceKHR = cast[proc(instance: VkInstance, pCreateInfo: ptr VkXlibSurfaceCreateInfoKHR, pAllocator: ptr VkAllocationCallbacks, pSurface: ptr VkSurfaceKHR): VkResult {.stdcall.}](vkGetInstanceProcAddr(instance, "vkCreateXlibSurfaceKHR")) + vkGetPhysicalDeviceXlibPresentationSupportKHR = cast[proc(physicalDevice: VkPhysicalDevice, queueFamilyIndex: uint32, dpy: ptr Display, visualID: VisualID): VkBool32 {.stdcall.}](vkGetInstanceProcAddr(instance, "vkGetPhysicalDeviceXlibPresentationSupportKHR"))