Mercurial > games > semicongine
view src/semicongine/platform/linux/vulkan.nim @ 544:c3c772512e7c
add: new vulkan api wrapper, not done yet
author | Sam <sam@basx.dev> |
---|---|
date | Thu, 23 Feb 2023 00:34:38 +0700 |
parents | e89fceb5a3a2 |
children |
line wrap: on
line source
# included in vulkan_helpers const REQUIRED_PLATFORM_EXTENSIONS = @["VK_KHR_xlib_surface".cstring] proc createVulkanSurface*(instance: VkInstance, window: NativeWindow): VkSurfaceKHR = var surfaceCreateInfo = VkXlibSurfaceCreateInfoKHR( sType: VK_STRUCTURE_TYPE_XLIB_SURFACE_CREATE_INFO_KHR, dpy: cast[ptr Display](window.display), window: cast[Window](window.window), ) checkVkResult vkCreateXlibSurfaceKHR(instance, addr(surfaceCreateInfo), nil, addr(result))