view semiconginev2/old/vulkan/platform/xcb.nim @ 1220:59e683c4728f compiletime-tests

del: outdated examples
author sam <sam@basx.dev>
date Wed, 17 Jul 2024 21:04:09 +0700
parents 56781cc0fc7c
children
line wrap: on
line source

type
  VkXcbSurfaceCreateInfoKHR* = object
    sType*: VkStructureType
    pNext*: pointer
    flags*: VkXcbSurfaceCreateFlagsKHR
    connection*: ptr xcb_connection_t
    window*: xcb_window_t
  xcb_connection_t *{.header: "xcb/xcb.h".} = object
  xcb_visualid_t *{.header: "xcb/xcb.h".} = object
  xcb_window_t *{.header: "xcb/xcb.h".} = object
# extension VK_KHR_xcb_surface
var
  vkCreateXcbSurfaceKHR*: proc(instance: VkInstance, pCreateInfo: ptr VkXcbSurfaceCreateInfoKHR, pAllocator: ptr VkAllocationCallbacks, pSurface: ptr VkSurfaceKHR): VkResult {.stdcall.}
  vkGetPhysicalDeviceXcbPresentationSupportKHR*: proc(physicalDevice: VkPhysicalDevice, queueFamilyIndex: uint32, connection: ptr xcb_connection_t, visual_id: xcb_visualid_t): VkBool32 {.stdcall.}
proc loadVK_KHR_xcb_surface*(instance: VkInstance) =
  loadVK_KHR_surface(instance)
  vkCreateXcbSurfaceKHR = cast[proc(instance: VkInstance, pCreateInfo: ptr VkXcbSurfaceCreateInfoKHR, pAllocator: ptr VkAllocationCallbacks, pSurface: ptr VkSurfaceKHR): VkResult {.stdcall.}](vkGetInstanceProcAddr(instance, "vkCreateXcbSurfaceKHR"))
  vkGetPhysicalDeviceXcbPresentationSupportKHR = cast[proc(physicalDevice: VkPhysicalDevice, queueFamilyIndex: uint32, connection: ptr xcb_connection_t, visual_id: xcb_visualid_t): VkBool32 {.stdcall.}](vkGetInstanceProcAddr(instance, "vkGetPhysicalDeviceXcbPresentationSupportKHR"))