view semicongine/vulkan/platform/xlib_xrandr.nim @ 920:c66503386e8b

Merge branch 'main' of github.com:saemideluxe/semicongine
author Sam <sam@basx.dev>
date Thu, 21 Mar 2024 15:39:42 +0700
parents e76822e943af 44ec744fbedc
children
line wrap: on
line source

type
  Display *{.header: "X11/Xlib.h".} = object
  VisualID *{.header: "X11/Xlib.h".} = object
  Window *{.header: "X11/Xlib.h".} = object
  RROutput *{.header: "X11/extensions/Xrandr.h".} = object
# extension VK_EXT_acquire_xlib_display
var
  vkAcquireXlibDisplayEXT*: proc(physicalDevice: VkPhysicalDevice, dpy: ptr Display, display: VkDisplayKHR): VkResult {.stdcall.}
  vkGetRandROutputDisplayEXT*: proc(physicalDevice: VkPhysicalDevice, dpy: ptr Display, rrOutput: RROutput, pDisplay: ptr VkDisplayKHR): VkResult {.stdcall.}
proc loadVK_EXT_acquire_xlib_display*(instance: VkInstance) =
  loadVK_EXT_direct_mode_display(instance)
  vkAcquireXlibDisplayEXT = cast[proc(physicalDevice: VkPhysicalDevice, dpy: ptr Display, display: VkDisplayKHR): VkResult {.stdcall.}](vkGetInstanceProcAddr(instance, "vkAcquireXlibDisplayEXT"))
  vkGetRandROutputDisplayEXT = cast[proc(physicalDevice: VkPhysicalDevice, dpy: ptr Display, rrOutput: RROutput, pDisplay: ptr VkDisplayKHR): VkResult {.stdcall.}](vkGetInstanceProcAddr(instance, "vkGetRandROutputDisplayEXT"))