mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-08 08:38:51 +00:00
wgpu: update to v24.0.0
This commit is contained in:
+21
-18
@@ -1,18 +1,21 @@
|
||||
package wgpu_sdl3_glue
|
||||
|
||||
import "vendor:sdl3"
|
||||
import "vendor:wgpu"
|
||||
|
||||
GetSurface :: proc(instance: wgpu.Instance, window: ^sdl3.Window) -> wgpu.Surface {
|
||||
view := sdl3.Metal_CreateView(window)
|
||||
metal_layer := sdl3.Metal_GetLayer(view)
|
||||
return wgpu.InstanceCreateSurface(
|
||||
instance,
|
||||
&wgpu.SurfaceDescriptor {
|
||||
nextInChain = &wgpu.SurfaceDescriptorFromMetalLayer {
|
||||
chain = wgpu.ChainedStruct{sType = .SurfaceDescriptorFromMetalLayer},
|
||||
layer = metal_layer,
|
||||
},
|
||||
},
|
||||
)
|
||||
}
|
||||
package wgpu_sdl3_glue
|
||||
|
||||
import "vendor:sdl3"
|
||||
import "vendor:wgpu"
|
||||
|
||||
GetSurface :: proc(instance: wgpu.Instance, window: ^sdl3.Window) -> wgpu.Surface {
|
||||
view := sdl3.Metal_CreateView(window)
|
||||
layer := sdl3.Metal_GetLayer(view)
|
||||
|
||||
return wgpu.InstanceCreateSurface(
|
||||
instance,
|
||||
&wgpu.SurfaceDescriptor{
|
||||
nextInChain = &wgpu.SurfaceSourceMetalLayer{
|
||||
chain = wgpu.ChainedStruct{
|
||||
sType = .SurfaceSourceMetalLayer,
|
||||
},
|
||||
layer = layer,
|
||||
},
|
||||
},
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user