Mercurial > games > semicongine
annotate 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 |
rev | line source |
---|---|
840
44ec744fbedc
did: package restructuring according to nimble recommendation for libraries
Sam <sam@basx.dev>
parents:
diff
changeset
|
1 import ../../core |
44ec744fbedc
did: package restructuring according to nimble recommendation for libraries
Sam <sam@basx.dev>
parents:
diff
changeset
|
2 import ../../platform/window |
44ec744fbedc
did: package restructuring according to nimble recommendation for libraries
Sam <sam@basx.dev>
parents:
diff
changeset
|
3 |
1138 | 4 proc CreateNativeSurface*(instance: VkInstance, window: NativeWindow): VkSurfaceKHR = |
1139
114f395b9144
did: finish refactoring and updated all tests accordingly
sam <sam@basx.dev>
parents:
1138
diff
changeset
|
5 assert instance.Valid |
840
44ec744fbedc
did: package restructuring according to nimble recommendation for libraries
Sam <sam@basx.dev>
parents:
diff
changeset
|
6 var surfaceCreateInfo = VkWin32SurfaceCreateInfoKHR( |
44ec744fbedc
did: package restructuring according to nimble recommendation for libraries
Sam <sam@basx.dev>
parents:
diff
changeset
|
7 sType: VK_STRUCTURE_TYPE_WIN32_SURFACE_CREATE_INFO_KHR, |
44ec744fbedc
did: package restructuring according to nimble recommendation for libraries
Sam <sam@basx.dev>
parents:
diff
changeset
|
8 hinstance: cast[HINSTANCE](window.hinstance), |
44ec744fbedc
did: package restructuring according to nimble recommendation for libraries
Sam <sam@basx.dev>
parents:
diff
changeset
|
9 hwnd: cast[HWND](window.hwnd), |
44ec744fbedc
did: package restructuring according to nimble recommendation for libraries
Sam <sam@basx.dev>
parents:
diff
changeset
|
10 ) |
44ec744fbedc
did: package restructuring according to nimble recommendation for libraries
Sam <sam@basx.dev>
parents:
diff
changeset
|
11 checkVkResult vkCreateWin32SurfaceKHR(instance, addr(surfaceCreateInfo), nil, addr(result)) |