Mercurial > games > semicongine
view src/zamikongine/platform/windows/vulkan.nim @ 39:0cb294c5d2fd
fix: hello cube, add: run_all command
author | Sam <sam@basx.dev> |
---|---|
date | Wed, 18 Jan 2023 13:49:12 +0700 |
parents | c3c963e7c1a6 |
children |
line wrap: on
line source
# included in zamikongine/vulkan_helpers const REQUIRED_PLATFORM_EXTENSIONS* = @["VK_KHR_win32_surface".cstring] proc load_platform_extensions() = loadVK_KHR_win32_surface() proc createVulkanSurface*(instance: VkInstance, window: NativeWindow): VkSurfaceKHR = var surfaceCreateInfo = VkWin32SurfaceCreateInfoKHR( sType: VK_STRUCTURE_TYPE_WIN32_SURFACE_CREATE_INFO_KHR, hinstance: window.hinstance, hwnd: window.hwnd, ) checkVkResult vkCreateWin32SurfaceKHR(instance, addr(surfaceCreateInfo), nil, addr(result))