wgpu: update to v24.0.0

This commit is contained in:
Laytan Laats
2025-02-17 19:55:44 +01:00
parent f0b1357132
commit ae9388c013
20 changed files with 1804 additions and 1345 deletions
+19 -29
View File
@@ -1,29 +1,19 @@
package wgpu_sdl3_glue
import win "core:sys/windows"
import "vendor:sdl3"
import "vendor:wgpu"
GetSurface :: proc(instance: wgpu.Instance, window: ^sdl3.Window) -> wgpu.Surface {
hwnd := sdl3.GetPointerProperty(
sdl3.GetWindowProperties(window),
sdl3.PROP_WINDOW_WIN32_HWND_POINTER,
nil,
)
hinstance := sdl3.GetPointerProperty(
sdl3.GetWindowProperties(window),
sdl3.PROP_WINDOW_WIN32_INSTANCE_POINTER,
nil,
)
return wgpu.InstanceCreateSurface(
instance,
&wgpu.SurfaceDescriptor {
nextInChain = &wgpu.SurfaceDescriptorFromWindowsHWND {
chain = wgpu.ChainedStruct{sType = .SurfaceDescriptorFromWindowsHWND},
hinstance = hinstance,
hwnd = hwnd,
},
},
)
}
package wgpu_sdl3_glue
import "vendor:sdl3"
import "vendor:wgpu"
GetSurface :: proc(instance: wgpu.Instance, window: ^sdl3.Window) -> wgpu.Surface {
return wgpu.InstanceCreateSurface(
instance,
&wgpu.SurfaceDescriptor{
nextInChain = &wgpu.SurfaceSourceWindowsHWND{
chain = wgpu.ChainedStruct{
sType = .SurfaceSourceWindowsHWND,
},
hinstance = sdl3.GetPointerProperty(sdl3.GetWindowProperties(window), sdl3.PROP_WINDOW_WIN32_INSTANCE_POINTER, nil),
hwnd = sdl3.GetPointerProperty(sdl3.GetWindowProperties(window), sdl3.PROP_WINDOW_WIN32_HWND_POINTER, nil),
},
},
)
}