Mercurial > games > semicongine
comparison semiconginev2/rendering/platform/windows.nim @ 1254:b0f4c8ccd49a
did: stuff to test gltf importer
author | sam <sam@basx.dev> |
---|---|
date | Sat, 27 Jul 2024 20:47:54 +0700 |
parents | a3fa15c25026 |
children | bfb75c934f4e |
comparison
equal
deleted
inserted
replaced
1253:c4f98eb4bb05 | 1254:b0f4c8ccd49a |
---|---|
191 let res = GetCursorPos(addr(p)) | 191 let res = GetCursorPos(addr(p)) |
192 if res: | 192 if res: |
193 return some(Vec2f([float32(p.x), float32(p.y)])) | 193 return some(Vec2f([float32(p.x), float32(p.y)])) |
194 return none(Vec2f) | 194 return none(Vec2f) |
195 | 195 |
196 proc SetMousePosition*(window: NativeWindow, x, y: int) = | |
197 CheckWin32Result SetCursorPos(x, y) | |
196 | 198 |
197 proc CreateNativeSurface*(instance: VkInstance, window: NativeWindow): VkSurfaceKHR = | 199 proc CreateNativeSurface*(instance: VkInstance, window: NativeWindow): VkSurfaceKHR = |
198 assert instance.Valid | 200 assert instance.Valid |
199 var surfaceCreateInfo = VkWin32SurfaceCreateInfoKHR( | 201 var surfaceCreateInfo = VkWin32SurfaceCreateInfoKHR( |
200 sType: VK_STRUCTURE_TYPE_WIN32_SURFACE_CREATE_INFO_KHR, | 202 sType: VK_STRUCTURE_TYPE_WIN32_SURFACE_CREATE_INFO_KHR, |