Mercurial > games > semicongine
comparison semiconginev2/rendering/platform/linux.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 |
---|---|
202 addr(mask), | 202 addr(mask), |
203 ) | 203 ) |
204 if onscreen != 0: | 204 if onscreen != 0: |
205 result = some(Vec2f([float32(winX), float32(winY)])) | 205 result = some(Vec2f([float32(winX), float32(winY)])) |
206 | 206 |
207 proc SetMousePosition*(window: NativeWindow, x, y: int) = | |
208 checkXlibResult XWarpPointer( | |
209 window.display, | |
210 default(x11.Window), | |
211 window.window, | |
212 0, 0, 0, 0, | |
213 x.cint, | |
214 y.cint, | |
215 ) | |
216 checkXlibResult XSync(window.display, false.XBool) | |
207 | 217 |
208 proc CreateNativeSurface(instance: VkInstance, window: NativeWindow): VkSurfaceKHR = | 218 proc CreateNativeSurface(instance: VkInstance, window: NativeWindow): VkSurfaceKHR = |
209 var surfaceCreateInfo = VkXlibSurfaceCreateInfoKHR( | 219 var surfaceCreateInfo = VkXlibSurfaceCreateInfoKHR( |
210 sType: VK_STRUCTURE_TYPE_XLIB_SURFACE_CREATE_INFO_KHR, | 220 sType: VK_STRUCTURE_TYPE_XLIB_SURFACE_CREATE_INFO_KHR, |
211 dpy: cast[ptr Display](window.display), | 221 dpy: cast[ptr Display](window.display), |