Mercurial > games > semicongine
view semicongine/platform/windows/surface.nim @ 1139:114f395b9144
did: finish refactoring and updated all tests accordingly
author | sam <sam@basx.dev> |
---|---|
date | Sat, 08 Jun 2024 14:58:25 +0700 |
parents | 02e1d2658ff5 |
children |
line wrap: on
line source
import ../../core import ../../platform/window proc CreateNativeSurface*(instance: VkInstance, window: NativeWindow): VkSurfaceKHR = assert instance.Valid var surfaceCreateInfo = VkWin32SurfaceCreateInfoKHR( sType: VK_STRUCTURE_TYPE_WIN32_SURFACE_CREATE_INFO_KHR, hinstance: cast[HINSTANCE](window.hinstance), hwnd: cast[HWND](window.hwnd), ) checkVkResult vkCreateWin32SurfaceKHR(instance, addr(surfaceCreateInfo), nil, addr(result))