Mercurial > games > semicongine
view src/semicongine/platform/linux/vulkan.nim @ 501:e89fceb5a3a2
did: rename project
author | Sam <sam@basx.dev> |
---|---|
date | Wed, 18 Jan 2023 13:52:48 +0700 |
parents | |
children | c3c772512e7c |
line wrap: on
line source
# included in vulkan_helpers const REQUIRED_PLATFORM_EXTENSIONS = @["VK_KHR_xlib_surface".cstring] proc load_platform_extensions() = loadVK_KHR_xlib_surface() proc createVulkanSurface*(instance: VkInstance, window: NativeWindow): VkSurfaceKHR = var surfaceCreateInfo = VkXlibSurfaceCreateInfoKHR( sType: VK_STRUCTURE_TYPE_XLIB_SURFACE_CREATE_INFO_KHR, dpy: window.display, window: window.window, ) checkVkResult vkCreateXlibSurfaceKHR(instance, addr(surfaceCreateInfo), nil, addr(result))