Mercurial > games > semicongine
comparison src/zamikongine/platform/linux/vulkan.nim @ 38:c3c963e7c1a6
did: tons of stuff, input, refactoring, fix some errors, some template improvment, sorry for super-commit
author | Sam <sam@basx.dev> |
---|---|
date | Wed, 18 Jan 2023 09:52:03 +0700 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
37:6859bcfabc62 | 38:c3c963e7c1a6 |
---|---|
1 # included in zamikongine/vulkan_helpers | |
2 const REQUIRED_PLATFORM_EXTENSIONS = @["VK_KHR_xlib_surface".cstring] | |
3 | |
4 proc load_platform_extensions() = | |
5 loadVK_KHR_xlib_surface() | |
6 | |
7 proc createVulkanSurface*(instance: VkInstance, window: NativeWindow): VkSurfaceKHR = | |
8 var surfaceCreateInfo = VkXlibSurfaceCreateInfoKHR( | |
9 sType: VK_STRUCTURE_TYPE_XLIB_SURFACE_CREATE_INFO_KHR, | |
10 dpy: window.display, | |
11 window: window.window, | |
12 ) | |
13 checkVkResult vkCreateXlibSurfaceKHR(instance, addr(surfaceCreateInfo), nil, addr(result)) |